When I wait until the page loaded

This step waits up to 10 seconds for the page to fully settle after a navigation or reload. It uses the same smart-settle probe as the timed wait steps: the step returns as soon as the DOM is ready, all in-flight network requests have completed, no pending setTimeout callbacks remain, and MutationObserver activity has been quiet for at least 250 ms. If the page settles before 10 seconds, the step returns early.

Use this step immediately after navigating to a URL or clicking a link that causes a full page load. It is more readable than specifying an arbitrary number of seconds and expresses intent clearly: you are waiting for the page to reach a stable, interactive state before asserting or interacting further.

Accepted phrasings

When I wait until the page is loaded
When we wait until the page is loaded
When wait until page loaded
And I wait until the page is loaded

Examples

When I wait until the page is loaded
When we wait until the page is loaded
When wait until page loaded
And I wait until the page is loaded

In a real scenario

Scenario: User navigates to the account settings page
  Given I am logged in as "editor"
  When I go to "/account/settings"
    And I wait until the page is loaded
  Then I should see "Account Settings"
    And I should see "Email"
    And I should see "Password"

Related steps

Back to Wait Steps