tap([options])
Tap on the chosen element.
Returns
Type | Description |
---|---|
Promise<void> | A Promise that fulfills when the tap action is finished. |
Example
import { browser } from 'k6/browser';
export default async function () {
const page = await browser.newPage({
hasTouch: true,
});
await page.goto('http://test.k6.io/browser.php');
const options = page.locator('#numbers-options');
await options.tap();
}