Close a tab vs quit the driver
Easy30 pts~12 min
- close vs quit
- Window handles
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
Close only a secondary tab with close(), keep the session alive, and leave quit() for teardown.
Your task
- 1Open TEST_URL and store the original window handle.
- 2Click
#open-tab, switch to the new tab and assert#child-headingis “Release notes”. - 3Call close() on that tab, then switch back to the original handle.
- 4Click
#mark-readand assert#main-statusshows “All caught up” — proof the session survived.
Acceptance criteria
- The test closes the tab with close()
#main-statusshows “All caught up” in the main window- At least 2 assertions pass
Selenium WebDriver 4 · QA Automation · Setup & first script