【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)
今天太阳也东升,而后西沉,早晨盛开的花儿也将凋谢;今天的太阳也西沉,而后东升,阳光照射之处遍地花开,但却已非昨日之花。