Answer the question
In order to leave comments, you need to log in
Selenium webDriver: StaleElementReferenceException. How to get rid?
Get a list of required web elements
List<WebElement> temp = driver.findElements(By.cssSelector("span.selection-link"));
Answer the question
In order to leave comments, you need to log in
save parsed web elements and work with them after driver.quit cannot be
processed while lukewarm
when accessing some method it has a check that it is still rendered by
the browser
This essentially determines whether or not the element is still attached to the DOM.
No ? sorry -
@throws StaleElementReferenceException If the element no
* longer exists as initially defined
You can do the following:
save the entire page to a string:
String html = driver.findElement(By.tagName("html")).getAttribute("innerHTML")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question