Selenium WebDriver 4

Navigate back, forward, and refresh

Easy30 pts~12 min
  • Browser history
  • Navigation
Practice app · TargetQA Practice Store

A small storefront landing page for browser setup, navigation, titles, URLs and screenshots.

Test URL
/lab/selenium-navigate-back-forward-and-refresh

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Use browser history navigation and assert the route after each step.

Your task

  1. 1Open TEST_URL, click #nav-products, then click #nav-about.
  2. 2Navigate back and assert the URL ends with “#/products”.
  3. 3Navigate forward and assert the URL ends with “#/about”.
  4. 4Refresh and assert #about-section is still displayed.

Acceptance criteria

  • back(), forward() and refresh() are used
  • The final URL contains “#/about”
  • #about-section is visible at the end
  • At least 3 assertions pass

Selenium WebDriver 4 · Selenium · Setup & first script