Skip to main content Skip to docs navigation

History Command

Control browser history navigation using HistoryCommand:: commands.

On this page
Action
Element Finder Value
HistoryCommand::Description
HistoryCommand::backGo back one step in the browser history.
HistoryCommand::forwardGo forward one step in the browser history.
HistoryCommand::go::-1Go back by 1 entry. Use positive numbers to go forward.
HistoryCommand::go::1Go forward by 1 entry.
HistoryCommand::pushState::{"state":{},"title":"","url":"/new-path"}Push a new state onto the history stack without reloading.
HistoryCommand::replaceState::{"state":{},"title":"","url":"/new-path"}Replace the current history entry without reloading.

For pushState and replaceState, the value after the third :: must be a JSON object with three fields: {"state": {}, "title": "", "url": "/path"}.