Testing / Selenium Interview questions
What is the difference between implicit wait and explicit wait?
Both exist to handle timing, but they operate at different scopes and with different precision.
| Implicit wait | Explicit wait |
| Set once, applies globally to all findElement calls | Applied per-condition, on a specific element/step |
| Only waits for element presence in the DOM | Can wait for visibility, clickability, text, and more via ExpectedConditions |
| Coarser, easy to misuse across a whole suite | More precise, generally the recommended approach |
An implicit wait only helps with elements that simply haven't appeared in the DOM yet; it does nothing for an element that exists but isn't yet visible or clickable, which is exactly the gap explicit waits with ExpectedConditions are built to cover.
More Related questions...