python selenium ElementClickInterceptedException

2020-10-17 15:34:46 蜻蜓队长


在使用 selenium.webdriver 的时候使用元素对象 .click() 方法是报错:

selenium.common.exceptions.ElementClickInterceptedException: xxx

可使用以下方式进行替换点击事件:

for i in driver.find_elements_by_class_name('className'):
    driver.execute_script("arguments[0].click();", i)
复制代码

i 是需要点击事件的元素对象。

以上内容来自于网络,如有侵权联系即删除
相关文章

上一篇: Flutter 股票 分时线、K线

下一篇: 【WWDC20】10646 - What's new in Web Inspector

客服紫薇:15852074331
在线咨询
客户经理