Open and switch to a new tab
Medium70 pts~25 min
- Window handles
- Tabs
Practice app · Help Center
Links and buttons that open new tabs and windows.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Open the release notes in a new tab, switch the driver to it and verify its content.
Your task
- 1Store the current window handle, then click #open-tab (a target=_blank link).
- 2Wait until two window handles exist.
- 3Switch to the handle that is not the original one.
- 4Assert the title is “Release notes | Help Center”, #child-heading reads “Release notes” and #child-message contains “Version 4.2 is live”.
Acceptance criteria
- Window handles are read and the driver switches window
- At least 3 assertions pass in the new tab
Selenium WebDriver 4 · Selenium · Frames, windows & tabs