Taiko
Documentation

Home / API Reference

tap

Fetches an element with the given selector, scrolls it into view if needed, and then taps on the element. If there's no element matching selector, the method throws an error.

Examples

await tap('Gmail')
await tap(link('Gmail'))

Parameters


selector

options

options.waitForNavigation boolean
  • Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass { navigationTimeout: 10000 } in options parameter.
Default value
true

options.waitForEvents

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

Default value
['firstMeaningfulPaint']

args Array

Proximity selectors


Returns

Promise