Skip to content

Commit

Permalink
Convert touchscreen example to async
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Apr 23, 2024
1 parent 1fbff60 commit 9bb04bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/touchscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bb04bd

Please sign in to comment.