报错内容:

selenium.common.exceptions.ElementClickInterceptedException

元素:

python+selenium button定位方法

 

 

解决方法2种:

1、

tijiao=driver.find_element_by_xpath("html/body/div[12]/div[2]/div[1]/div[1]/div[3]/div[1]/button[2]/span")
driver.execute_script("arguments[0].click();",tijiao)

 

2、本元素采用第2种方法

btn[0]   : 元素

from selenium import webdriver

webdriver.ActionChains(self.browser).move_to_element(btns[0]).click(btns[0]).perform()

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案