This step moves backward one entry in the browser's history stack, equivalent to clicking the browser's Back button. It is implemented using Playwright's page.goBack() method. Use it to verify that back-navigation works correctly, that form state or scroll position is restored as expected, or that the browser history is maintained after a series of navigations.
The pronoun prefix (I or we) is optional and does not change behaviour. No additional wait is applied after the back navigation, so follow this step with an assertion or a wait step if the previous page needs time to restore. If no prior page exists in the history stack, page.goBack() has no effect.
Accepted phrasings
When I move backward one page
When we move backward one page
And move backward one page
Examples
When I move backward one page
When we move backward one page
And move backward one page
In a real scenario
Scenario: The back button returns the user to the previous page
Given I am on the homepage
When I go to "/products"
And wait
Then I should be on "/products"
When I move backward one page
And wait
Then I should be on homepage