waitForLoadState
page.waitForLoadState(state) waits for the page to reach a specific load state:
'load'— window load event fired'domcontentloaded'— DOM fully parsed'networkidle'— no network connections for 500ms
Task:
- Navigate to
https://testkru.com/Elements/TextFields - Wait for
'networkidle'state - Print the page title
- Print the current URL
Expected output:
Title: Text Fields URL: https://testkru.com/Elements/TextFields
TestKru