按钮点击报错:selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button type="button" class="ant-btn ant-btn-primary">...</button> is not clickable at point (1013, 212). Other element would receive the click: 

第一种方式若报错,可以使用二三方式:

driver.find_element_by_xpath('/html/body/div[6]/div/div[2]/div/div[2]/div/div/div[2]/button[2]').click()   # 普通的元素点击方式
element = driver.find_element_by_xpath('/html/body/div[6]/div/div[2]/div/div[2]/div/div/div[2]/button[2]')
ActionChains(driver).move_to_element(element).click().perform()     # 使用鼠标点击的方式
driver.find_element_by_xpath('/html/body/div[6]/div/div[2]/div/div[2]/div/div/div[2]/button[2]').send_keys(Keys.ENTER)   # 使用键盘回车键的方式

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-07-06
  • 2022-01-22
猜你喜欢
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-12-12
  • 2021-08-21
  • 2021-10-04
  • 2021-07-18
相关资源
相似解决方案