Alerts, Frames & Windows
Alerts, confirms, prompts, iframes, nested frames, new tabs and modals.
Alerts
Simple alert, an alert after 5 seconds, a confirm box and a prompt – the four JavaScript dialogs you must know how to handle.
Frames
Two iframes on one page. You cannot touch anything inside them until you switch into the frame – and you must switch back afterwards.
Nested Frames
A frame inside a frame. To reach the inner text you have to switch twice, in order.
Browser Windows & Tabs
New tabs and new windows. The test has to move its focus to the new handle, do its work, close it and return.
Modal Dialogs
In-page modals – not browser alerts. They can be closed with the X, with a button, by clicking the background or with the Escape key.
Every control has an id and a test id that never change between builds.
Each page lists the assertions worth writing, including the cases people forget.
Compare your script with a working Selenium (Java) and Playwright (TypeScript) version.