我正在努力克服我遇到的这种情况。错误: OpenQA.Selenium.StaleElementReferenceException: stale element reference: element is not attachedto the page document
(Session info: chrome=87.0.4280.88) 导致以下错误的代码片段是:- webDriver.Url = "https://www.xzy.com
我面临着陈旧元素异常的问题。我已经用谷歌搜索过了,在stackoverflow中找到了一些答案,但都没有用。我开始了解到,当DOM元素被销毁并重新创建时,就会发生这种异常。在这里,我的场景是我有一个包含记录的表,在它下面有一个类似这样的文本,“显示6行中的1到6行”。当我单击刷新按钮时,发生此异常。throw new AutomationError(t);}
getRecordsCountFromTa
Click方法继续返回Stale Element Exception
public @FindBy(xpath = ".category_menu'//atext()='Supercars‘“) WebElement link_Supercars;
org.openqa.selenium.StaleElementReferenceException:陈旧元素引用:<