TestForge
Log in

Multi-Window / Popup Handling

This page opens a real second browser window via window.open(). The popup contains a form; on submit it posts a message back to this opener window via window.opener.postMessage() and then closes itself. Automation tools must switch to the new window handle, interact with it, then switch back.

Open a popup window

Clicking the button below calls window.open() with fixed dimensions, producing a genuine new window/tab (browser-dependent) rather than an in-page modal.

Popup status: closed

Value received from popup:

Nothing received yet — submit the popup form to send a value here.

Same-tab vs. new-tab navigation

The link below uses target="_blank", which hands off navigation to a brand-new tab/window context rather than a popup opened programmatically. Automation tools must enumerate window handles to find the newly-opened tab.

Open popup route in a new tab (target=_blank)