首页 > 编程语言 > 详细

python自动化测试,遇到selenium.common.exceptions.ElementClickInterceptedException: Message: Element错的解决方法

时间:2021-03-03 19:21:22      阅读:232      评论:0      收藏:0      [点我收藏+]

是因为元素被遮挡了。

我遇到的错误是如果某个输入框有提示下拉匹配

但是我没有输入可以匹配的,就会出现这个错误。

解决方法:

element = self.driver.find_element_by_id(‘_project_funding_year‘)
webdriver.ActionChains(self.driver).move_to_element(element).click(element).perform()

在提示下拉框的下一个定位的元素,换成此处的写法即可。

python自动化测试,遇到selenium.common.exceptions.ElementClickInterceptedException: Message: Element错的解决方法

原文:https://www.cnblogs.com/zz-1021/p/14476155.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!