Why "page.goto()" is slowing down your tests

Why "page.goto()" is slowing down your tests

Jul 11, 2024

In this video, we dive into Playwright's "page.goto()" and understand why it could be slowing down your end-to-end tests. We start with an example script and then walk you through the Playwright UI mode to understand how resource loading can delay the "page.goto()" call.

We also look into the different "waitUntil" configurations and check how they affect the speed of your tests. Enjoy, and drop any questions or comments below!

Blog post: https://www.checklyhq.com/blog/
"page.goto()" docs: https://playwright.dev/docs/api/class-page#page-goto
"addLocatorHandler" explained: https://www.youtube.com/watch
Playwright synthetic monitoring: https://www.checklyhq.com/product/synthetic-monitoring/

0:00 Intro

1:52 How does "page.goto()" work?

3:38 Should you use other "waitUntil" options?

4:49 Playwright auto-waiting and web-first assertions

5:39 Poor UX and poor hydration patterns

7:07 Should you use "commit" or "domcontentloaded" — it depends!

8:24 Outro

#playwright #syntheticmonitoring #checkly