Coming from Selenium where I sprinkled WebDriverWait everywhere. Playwright claims to auto-wait — what exactly does it wait for before each action?
Environment
Any
Accepted answer
Before every action (click, fill, check…) Playwright waits for the element to be: attached to DOM, visible, stable (not animating), enabled, and receiving events (nothing overlapping). Only then does it act. That is why locator.click() rarely needs explicit waits — you only reach for expect(locator).toBeVisible() when you are asserting, not acting.
Anonymous·6d ago