Skip to main content

Close Browser Windows in Scenario Editor

Close Browser Windows in Scenario Editor

Use this guidance when a Scenario Editor test opens a second browser window, tab, or popup and must return to the main application flow. Keep window handling explicit so the test does not continue in the wrong context.

  1. Trigger the action that opens the new window or tab.
  2. Wait for the expected window, tab, or popup to be available.
  3. Validate or capture the needed content.
  4. Close the secondary window and switch back to the original context.
  5. Validate that the next step runs in the intended page.

Good practices

  • Use clear step names that identify the window being handled.
  • Avoid relying on window order if titles or URLs can be validated.
  • Capture output when popup behavior fails or is blocked by the browser.

Last updated: September 9, 2026