Python+Selenium定位元素报:Other element would receive the click---被遮挡,点击事件被上级元素获取的处理

需要定位“办理”按钮

Python+Selenium定位元素报:Other element would receive the click---被遮挡,点击事件被上级元素获取的处理_第1张图片

CSS_SELECTOR定位(单属性定位):“span[title='办理']”报错如下:

selenium.common.exceptions.WebDriverException:

Message: unknown error: Element is not clickable at point (805, 263). Other element would receive the click: ...

可以先定位到接收点击事件的元素,再找到底下的所需元素,CSS_SELECTOR定位(层级定位):

"td[data-dt-row='0']>a:nth-child(2)>span[title='办理']"

你可能感兴趣的:(python,selenium,python)