Python 消息:元素不可交互。Xpath正确

Python 消息:元素不可交互。Xpath正确,python,selenium,webdriver,selenium-chromedriver,webdriverwait,Python,Selenium,Webdriver,Selenium Chromedriver,Webdriverwait,如何单击?显然,我可以用鼠标,一个新的面具出现了。单击()时出现以下错误 显然Xpath是正确的,事实上它报告了以下代码= driver.find_element_by_xpath("//span[@class='example']") <selenium.webdriver.remote.webelement.WebElement (session="9e25c2b4350ca89b8da611a6dc63ae0c", element="

如何单击?显然,我可以用鼠标,一个新的面具出现了。单击()时出现以下错误

显然Xpath是正确的,事实上它报告了以下代码=

driver.find_element_by_xpath("//span[@class='example']")
<selenium.webdriver.remote.webelement.WebElement (session="9e25c2b4350ca89b8da611a6dc63ae0c", element="f8dc7d1a-a31a-4fc8-98ec-34ff5a7fa12e")>
driver.通过xpath(//span[@class='example'])查找元素
此消息错误:

selenium.common.exceptions.ElementNotInteractiableException:消息:元素不可交互


使用
WebDriverWait
()并等待
元素可点击
()

您需要导入以下库

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

在我尝试之后,但元素是可见的。事实上,我使用调试控制台。恐怕这是一种互动problem@lolino:使用上述代码时是否出现相同错误?回溯(最近一次调用):REASE TimeoutException(message,screen,stacktrace)selenium.common.exceptions中的exec(exp,global_vars,local_vars)文件“”,第1行。TimeoutException:message::(@lolino:element似乎在页面上不可见。如果我能看到任何具有隐藏样式的父级,您可以发布html或共享url吗。
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By