Playwright enables us to control multiple browser tabs, albeit in different ways.Documentation Index
Fetch the complete documentation index at: https://checkly-422f444a-sync-playwright-reporter-changelog-v1-5-0.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Opening tabs directly
If we are looking to open brand new tabs with which to interact, the setup is rather straightforward.multitab-open.spec.ts
Handling links that open a new tab
Controlling tabs that are opened after a click on an element on the page can be trickier. Let’s explore this through an example:- Navigating to
https://checklyhq.com/docs. - Opening a new tab by clicking the link to the Checkly YouTube channel which opens in a new tab.
page.waitForEvent, Playwright enables us to “catch” it following a click on an element with target="_blank", and then seamlessly interact with any of the currently open tabs.
multitab-flows.spec.ts
Further reading
- Official documentation on Playwright’s multi-tab scenarios
Bugs don’t stop at CI/CD. Why would Playwright? 
Sign up and start using Playwright for end-to-end monitoring with Checkly.