Different types of waits in the Playwright
When you are automating UI, waiting for the elements is common. Every automation tools have different types of waits which makes your automation run smooth and stable. We can divide this waits in two parts - static waits and dynamic waits. In static waits automation get paused for certain amount of time and then starts running again where as in dynamic waits it keeps on looking for action it is waiting for. In Playwright there are many waits available which waits for certain actions. Also for each actions there are different wait methods which makes it easy to use and more stable than any other tools. So lets learn about different types of waits in the Playwright.
Playwrigh provides bellow waits in Page class -
- Auto Waits
- waitForTimeout()
- waitForEvent()
- waitForURL()
- waitForSelector()
- waitForRequest()
- waitForResponse()
- waitForNavigation()
- WaitForFunction()
- waitForLoadState()
All Playwright Tutorial Posts -
- Setup NodeJS playwright and run the first script
- Learn basic automation with Playwright - with code
- Expect and Auto-waits in Playwright
- How to debug the playwright script?
- How to compare screenshots using Playwright?
- Best Practices with Playwright automation
- Playwright Tutorial - Handle Multiple Tabs with Playwright
- automate downloads using Playwright?
- Automate file upload using Playwright
No comments