Skip to content
Preptima
mediumConceptCodingMidSenior

Walk me through waiting in Selenium: implicit versus explicit, why you get StaleElementReferenceException, and how page objects fit in.

5 min readUpdated 2026-08-15

Answer

Short answer

An implicit wait retries element location globally and nothing else; an explicit wait polls for a named condition and is the only tool that can wait for state. Stale references happen because a WebElement points at one DOM node that no longer exists, so the cure is re-locating rather than re-waiting.

Was this answer helpful?

Likely follow-ups

  • What does findElements do when an implicit wait is set and nothing matches?
  • How would you write a retry that survives a component re-rendering mid-interaction?
  • Where do assertions live if the page object returns page objects?
  • Your application is a single page of nested components with no page boundaries. What replaces page objects?

Related questions

Further reading

Related Topics