Traceback (most recent call last): File "d:\pythonbaijiahao\baijiahao.py", line 82, in mianrun sub_element.click() File "D:\python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 81, in click self._execute(Command.CLICK_ELEMENT) File "D:\python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute return self._parent.execute(command, params) File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute self.error_handler.check_response(response) File "D:\python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="client_pages_content_v2_components_data2action_actions_videoManageGoods" href="/builder/rc/edit?edit_goods=1&type=videoV2&article_id=4818569555802859271&had_goods=1&video_type=ugc_video" target="_blank" rel="noopener noreferrer" data-urlkey="内容管理页-...-点击pv/uv">管理商品</a> is not clickable at point (930, 347). Other element would receive the click: <svg viewBox="64 64 896 896" focusable="false" data-icon="vertical-align-top" width="1em" height="1em" fill="currentColor" aria-hidden="true">...</svg> (Session info: MicrosoftEdge=113.0.1774.42) Stacktrace:
时间: 2023-06-26 18:05:10 浏览: 417
TypeError: unsupported format string passed to NoneType.__format__
5星 · 资源好评率100%
这是一个 Selenium 的异常信息,提示元素被遮挡而无法点击。具体来说,它告诉我们在点击某个元素时,该元素的某一部分被其他元素覆盖,导致无法点击。解决方法可以尝试以下几个方案:
1. 等待元素可点击再进行点击操作,使用 `WebDriverWait` 等待元素可点击后再执行点击操作;
2. 尝试使用 `ActionChains` 类模拟鼠标操作,比如移动鼠标到元素上再进行点击;
3. 如果上述方法都无法解决问题,可以尝试使用 JavaScript 执行点击操作,通过 `driver.execute_script("arguments[0].click();", element)` 执行 JavaScript 代码模拟点击操作。
阅读全文