tap(selector[, options])
Tap the first element that matches the selector.
Returns
Example
import { browser } from 'k6/browser';
export const options = {
scenarios: {
browser: {
executor: 'shared-iterations',
options: {
browser: {
type: 'chromium',
},
},
},
},
};
export default async function () {
const page = await browser.newPage({
hasTouch: true,
});
await page.goto('https://test.k6.io/browser.php');
const frame = page.mainFrame();
await frame.tap("#numbers-options");
}