From 9bb04bd180b0c4c3e4934f930dbf8447a8dd6ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 22 Apr 2024 16:13:25 +0300 Subject: [PATCH] Convert touchscreen example to async --- examples/touchscreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/touchscreen.js b/examples/touchscreen.js index d0760a72e..3e2121760 100644 --- a/examples/touchscreen.js +++ b/examples/touchscreen.js @@ -21,7 +21,7 @@ export default async function () { // Obtain ElementHandle for news link and navigate to it // by tapping in the 'a' element's bounding box const newsLinkBox = page.$('a[href="/news.php"]').boundingBox(); - page.touchscreen.tap(newsLinkBox.x + newsLinkBox.width / 2, newsLinkBox.y); + await page.touchscreen.tap(newsLinkBox.x + newsLinkBox.width / 2, newsLinkBox.y); // Wait until the navigation is done before closing the page. // Otherwise, there will be a race condition between the page closing