Taiko
Documentation

Home / API Reference

scrollTo

Scrolls the page to the given element.

Examples

await scrollTo('Get Started')
await scrollTo(link('Get Started'))

Parameters


selector

A selector of an element to scroll to.


options

options.waitForEvents Array<string>

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

Default value
[]

Returns

Promise<void>