【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)
posted @ 2019-11-29 08:48  心脏鼓点  阅读(3059)  评论(0编辑  收藏  举报