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

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

Default value
['firstMeaningfulPaint']

Returns

Promise