🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Add Thread.sleep(5000)
  2. B.Use an implicit wait
  3. C.Find the element again after the page changes
  4. 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 →