loop will continue and we will get exception }
但有时我会在element.getText()这一行得到这个错误org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached
我在TestNG(Java)中运行了一些selenium自动化测试,我得到了org.openqa.selenium.StaleElementReferenceException: stale elementreference: element is not attached to the page document这个错误。我的测试有将近2000行,我随机得到了这个错误。我在代码中使用显式等待和Thread.sleep。
谢谢