Execute tests on a Selenium Grid
Expert190 pts~70 min
- Selenium Grid
- RemoteWebDriver
- Capabilities
Practice app · Acme Ops
A sign-in page with field validation and an authenticated dashboard.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Create the driver through a Selenium Grid endpoint taken from the environment, with a local fallback.
Your task
- 1Read the Grid URL from SELENIUM_REMOTE_URL (for example http://localhost:4444).
- 2When it is set, create RemoteWebDriver / webdriver.Remote / new Builder().usingServer(url) with ChromeOptions.
- 3Otherwise fall back to a local Chrome driver.
- 4Sign in with qa@target.dev / Test@123 (#username, #password, #login-button). Assert the dashboard and log the session's browserName capability.
Acceptance criteria
- A remote driver is created from an environment-provided URL
- The dashboard is shown
- At least 1 assertion passes
Constraints
- The suite must still pass on the practice runner: fall back to a local Chrome driver when the environment variable is not set.
Fixtures
- username
- qa@target.dev
- password
- Test@123
Selenium WebDriver 4 · SDET · Grid, parallel & CI