Navigation

Provides functionality to control browser navigation such as back, forward, and refresh actions.

Classes

Navigation

Methods

(async) back(optionsopt) → {Promise.<void>}

Navigates backward in the browser's history.
Parameters:
NameTypeAttributesDescription
optionsObject<optional>
Additional options for navigation. Set {wait:true} to wait for the page complete check to run.
Throws:
Throws an error if navigation fails.
Type
Error
Returns:
A promise that resolves when the navigation action is completed.
Type: 
Promise.<void>
Example
await commands.navigation.back();

(async) forward(optionsopt) → {Promise.<void>}

Navigates forward in the browser's history.
Parameters:
NameTypeAttributesDescription
optionsObject<optional>
Additional options for navigation. Set {wait:true} to wait for the page complete check to run.
Throws:
Throws an error if navigation fails.
Type
Error
Returns:
A promise that resolves when the navigation action is completed.
Type: 
Promise.<void>
Example
await commands.navigation.forward();

(async) refresh(optionsopt) → {Promise.<void>}

Refreshes the current page.
Parameters:
NameTypeAttributesDescription
optionsObject<optional>
Additional options for refresh action. Set {wait:true} to wait for the page complete check to run.
Throws:
Throws an error if refreshing the page fails.
Type
Error
Returns:
A promise that resolves when the page has been refreshed.
Type: 
Promise.<void>
Example
await commands.navigation.refresh();