Taiko
Documentation

Home / API Reference

goBack

Mimics browser back button click functionality.

Examples

await goBack()

Parameters


options

options.waitForNavigation boolean

Wait for navigation after the goBack. Default navigation timeout is 30 seconds, to override pass { navigationTimeout: 10000 } in options parameter.

Default value
true

options.waitForEvents Array<string>

Events available to wait for ['DOMContentLoaded', 'loadEventFired', 'networkAlmostIdle', 'networkIdle', 'firstPaint', 'firstContentfulPaint', 'firstMeaningfulPaint', 'targetNavigated']

Default value
[]

options.navigationTimeout number

Navigation timeout value in milliseconds for navigation after click.

Default value
30000

options.waitForStart number

time to wait for navigation to start. Accepts value in milliseconds.

Default value
100

Returns

Promise<void>