From 044ba90dcf38002604f38389340556e4a7ed9e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 24 Apr 2024 13:47:18 +0300 Subject: [PATCH] Update browser tap to async --- .../javascript-api/k6-experimental/browser/locator/tap.md | 8 +++++++- .../javascript-api/k6-experimental/browser/page/tap.md | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/locator/tap.md b/docs/sources/next/javascript-api/k6-experimental/browser/locator/tap.md index 18c97091a2..beeedd9cff 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/locator/tap.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/locator/tap.md @@ -30,6 +30,12 @@ Tap on the chosen element. +### Returns + +| Type | Description | +| ------------- | -------------------------------------------------------- | +| Promise | A Promise that fulfills when the tap action is finished. | + ### Example {{< code >}} @@ -44,7 +50,7 @@ export default async function () { await page.goto('https://test.k6.io/browser.php'); const options = page.locator('#numbers-options'); - options.tap(); + await options.tap(); } ``` diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/page/tap.md b/docs/sources/next/javascript-api/k6-experimental/browser/page/tap.md index 90664328cc..0d7141b18e 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/page/tap.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/page/tap.md @@ -31,6 +31,12 @@ Tap the first element that matches the selector. +### Returns + +| Type | Description | +| ------------- | -------------------------------------------------------- | +| Promise | A Promise that fulfills when the tap action is finished. | + ### Example {{< code >}} @@ -55,7 +61,7 @@ export default async function () { const page = browser.newPage(); await page.goto('https://test.k6.io/browser.php'); - page.tap('#numbers-options'); + await page.tap('#numbers-options'); } ```