← Quiz: Waits: all 10 questions
Quiz: Waits · Question 10 of 10
After a table reloads, using a WebElement found earlier throws StaleElementReferenceException. What is the fix?
After a table reloads, using a WebElement found earlier throws StaleElementReferenceException. What is the fix?
- A.Add Thread.sleep(5000)
- B.Use an implicit wait
- C.Find the element again after the page changes
- D.Restart the browser
Answer & explanation
Correct answer: Find the element again after the page changes
The old reference points to an element that was removed from the DOM.
Can you get the rest right without peeking?
Take the timed Quiz: Waits quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →