Skip to content

Navigation Steps

Beginners: start with Quick Start or Running Tests if you need the operational context first. This page is the exact navigation-step reference.

Source: src/tests/steps/actions/navigation.step.ts.

See shared placeholder rules in Step Parameter Conventions.

Prefer installing published steps with npx appraisejs@latest add step ... instead of adding the package to your project with npm install.

Use navigation steps when the scenario must move to a URL, use the selected environment base URL, reload, or move backward in browser history.

the user navigates to the {string} url

Terminal window
npx appraisejs@latest add step navigation/navigate-to-url
  • Navigates directly to provided URL.
  • Waits for domcontentloaded.
ParameterRepresentsExpected data
{string}Destination URLAbsolute URL (for example https://example.com/login).
When the user navigates to the "https://example.com/login" url

2. Navigate to selected environment base URL

Section titled “2. Navigate to selected environment base URL”

the user navigates to the base url of the selected environment

Terminal window
npx appraisejs@latest add step navigation/navigate-to-environment-base-url
  • Reads ENVIRONMENT runtime value.
  • Resolves environment config.
  • Navigates to configured baseUrl.
  • None.
When the user navigates to the base url of the selected environment

the user reloads the page

Terminal window
npx appraisejs@latest add step navigation/reload
  • Reloads current page.
  • Waits for domcontentloaded.
  • None.
When the user reloads the page

the user goes back to the previous page

Terminal window
npx appraisejs@latest add step navigation/go-back
  • Executes browser back navigation.
  • Waits for domcontentloaded.
  • None.
When the user goes back to the previous page
  • Environment-based step fails if environment is unset or unknown.
  • Navigation errors bubble up from Playwright as step failures.