SoftwareTestPilot
All discussions
Maya RaoJul 12

How does Playwright auto-waiting actually work?

Coming from Selenium where I sprinkled WebDriverWait everywhere. Playwright claims to auto-wait — what exactly does it wait for before each action?

playwrightwaits
Related learningLearn this concept in the Playwright course

1 answer

Accepted solution

Maya RaoJul 13

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.