python + selenium 执行时报错:
selenium.common.exceptions.ElementClickInterceptedException:
Message: element click intercepted:
Element <a href="https://blog.csdn.net/xp178171640/article/details/115144126"
data-report-click="{"spm":"1001.2014.3001.5190"}"
target="_blank">...</a>
is not clickable at point (865, 41).
Other element would receive the click:
<div class="toolbar-container-middle">...</div>
(Session info: MicrosoftEdge=90.0.818.51)
其中关键内容是:
selenium.common.exceptions.ElementClickInterceptedException:
Message: element click intercepted:
修改方法如下:
将原执行代码
ele.click()
改为
driver.execute_script("arguments[0].click();", ele)
网上说是元素定位相互覆盖。