Windows & Tabs

medium

Leave the page, work in another context, and come back with proof.

New tab

This link opens a target page in a new tab. Switch your test to the new tab, assert its heading (data-testid="target-heading" reads "You made it to the new tab"), then switch back here.

Popup window

The popup displays a secret code that this page never shows. Read it from the popup window, type it below, and verify it — the only way to pass is to actually switch contexts.

No popup opened yet.

Delayed popup

This popup opens 2 seconds after the click — your test must wait for a window that does not exist yet.

Not started.

Popup closed notification

When any popup from this page closes, it posts a message back to its opener. Close a popup (its button or the window control) and assert the status below.

No popup closed yet.