比如你使用selenium使用click操作
driver.find_element(By.CSS_SELECTOR,"#submit").click()
报了下面错误
出现如下异常:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button type="submit" id="submit" class="btn btn-wide btn-primary" data-loading="稍候...">...</button> is not clickable at point (518, 660). Other element would receive the click: <ul class="breadcrumb">...</ul>
(Session info: chrome=78.0.3904.108)
这时候我们怎么来解决呢
解决方法:
使用回车代替点击,使用send_keys操作回车按钮
driver.find_element(By.CSS_SELECTOR,"#submit").send_keys(Keys.ENTER)
只需要把.click()改为.send_keys(Keys.ENTER)即可
最后
以上就是结实店员最近收集整理的关于selenium点击click报错,如何解决的全部内容,更多相关selenium点击click报错内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复