按钮怎么点击,红色的播放按钮

img


以上是一个视频的红色的那个三角按钮,我想点击他让他播放
以下是代码
link = driver.find_element_by_xpath('//*[@id="_video_player"]/div[8]/button[1]')
ActionChains(driver).move_to_element(link).perform()
ActionChains(driver).click(link).perform()

xpath语句没有问题的,可以显示文本,但是就是报错:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable: [object HTMLButtonElement] has no size and location
(Session info: chrome=99.0.4844.82)

这个意思是这个元素button没有大小和location,我从网上查了一下是不是这个是隐藏的按钮不能点击,问一下怎么点击

  1. 打开指定页面后设置足够的睡眠时间让页面有足够的时间加载
  2. 确认待点击的播放按钮是否唯一
    看了别人的文章给的两个排查问题的点