Selenium WebDriver 4

Add cross-browser coverage

Hard120 pts~45 min
  • Cross-browser testing
  • Driver factory
Practice app · Acme Ops

A sign-in page with field validation and an authenticated dashboard.

Test URL
/lab/sdet-add-cross-browser-coverage

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

Objective

Run the same sign-in check across Chrome, Firefox and Edge through a single driver factory.

Your task

  1. 1Write createDriver(browserName) supporting chrome, firefox and edge.
  2. 2Read the browser list from a BROWSERS environment variable (comma-separated), defaulting to chrome.
  3. 3Run the sign-in check once per browser via parametrisation or a loop.
  4. 4Assert the dashboard for every browser and quit each driver.

Acceptance criteria

  • The factory supports other browsers than Chrome
  • Browsers are iterated or parametrised
  • The dashboard is shown
  • At least 1 assertion passes

Constraints

  • Default to chrome when BROWSERS is not set so the suite runs on the practice runner.

Fixtures

username
qa@target.dev
password
Test@123

Selenium WebDriver 4 · SDET · Grid, parallel & CI