Multi-tab & iframes
For the complete documentation index, see llms.txtunotest scenarios can span tabs and reach into frames.
Switch tabs
When an action opens a new tab, switch to it by index (0-based):
step("Open the invoice in a new tab", () => { click(getByRole("link", { name: "View invoice" })); setPage(1); // focus the new tab assertVisible(getByText("Invoice #"));});Inspect tabs with the list_pages / get_active_context MCP tools while
exploring.
Work inside an iframe
Enter a frame to scope subsequent calls; exit when done:
step("Submit the embedded payment form", () => { enterFrame(getByTestId("payment-iframe")); fill(getByLabel("Card number"), TEST_CARD); click(getByRole("button", { name: "Pay" })); exitFrame();});Or resolve a single element across the boundary with contentFrame(). See the
DSL reference.