Testing / Playwright Interview questions
Define auto-waiting in Playwright?
Auto-waiting means Playwright automatically waits for an element to be actionable before performing an interaction, instead of requiring a manual sleep() or explicit wait call in the test code.
Before an action like click() or fill() runs, Playwright performs a series of actionability checks on the target element:
- Attached to the DOM
- Visible (has non-zero size and no
visibility: hidden) - Stable (not still animating or mid-transition)
- Enabled (not disabled)
- Able to receive events (not obscured by another element)
If a check fails, Playwright retries until it passes or the action timeout is reached, then throws a descriptive timeout error naming which check failed.
More Related questions...