【Selenium】selenium.common.exceptions.ElementClickInterceptedException


出现问题:
使用代码点击提交按钮:

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)

解决方法:
使用回车代替点击

driver.find_element(By.CSS_SELECTOR,"#submit").send_keys(Keys.ENTER)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM