我正在使用Selenium WebDriver自动化一些东西。它需要填写一个表单,该表单涉及从select2下拉列表中选择一个值。这段代码可以工作,但有时会抛出StaleElementReferenceException。这是错误:
org.openqa.selenium.StaleElementReferenceException: Element not found in the cache - perhaps thedocumentation on this error, please visit: http:
我在Python/Selenium代码中使用此函数不断搜索元素,直到它可见。timeout_seconds=10): retries = timeout_seconds from selenium.commonreturn element exceptions.StaleElementReferenceE