您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

selenium.common.exceptions.ElementClickInterceptedException:消息:拦截了元素单击:Selenium和Python无法单击元素

selenium.common.exceptions.ElementClickInterceptedException:消息:拦截了元素单击:Selenium和Python无法单击元素

如果 xpath 的路径正确,则可以尝试使用此方法解决此问题。将旧代码替换为以下代码

button = driver.find_element_by_xpath("xpath"]")
driver.execute_script("arguments[0].click();", button)

我之前已经解决了这个问题,但老实说,我不知道原因。

python 2022/1/1 18:14:37 有594人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶