Skip to content

Navigation Steps

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

See shared placeholder rules in Step Parameter Conventions.

Signature: the user navigates to the {string} url

What it does:

  • Navigates directly to provided URL.
  • Waits for domcontentloaded.

Parameters:

ParameterRepresentsExpected data
{string}Destination URLAbsolute URL (for example https://example.com/login).

Example:

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”

Signature: the user navigates to the base url of the selected environment

What it does:

  • Reads ENVIRONMENT runtime value.
  • Resolves environment config.
  • Navigates to configured baseUrl.

Parameters:

  • None.

Example:

When the user navigates to the base url of the selected environment

Signature: the user reloads the page

What it does:

  • Reloads current page.
  • Waits for domcontentloaded.

Parameters:

  • None.

Example:

When the user reloads the page

Signature: the user goes back to the previous page

What it does:

  • Executes browser back navigation.
  • Waits for domcontentloaded.

Parameters:

  • None.

Example:

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.