-
Notifications
You must be signed in to change notification settings - Fork 241
Closed
Labels
Area: browserThe browser moduleThe browser module
Description
As part of xk6-browser v0.9.0 release, locator.click()
now supports async/await syntax so this needs to be reflected on our docs too. See below info:
xk6-browser#790 Convert locator.click
to async to have feature parity with page.click
and elementHandle.click
. Users must remember to work with promise.All
and page.waitForNavigation()
when a click action results in navigation.
A `location.click` action that doesn't result in navigation can be used like so:
```javascript
const tails = page.locator("input[value='Bet on tails!']");
await tails.click(),
```
A `location.click` action that does result in a navigation can be used like so:
```javascript
const tails = page.locator("input[value='Bet on tails!']");
await Promise.all([
page.waitForNavigation(),
tails.click(),
]);
```
Metadata
Metadata
Assignees
Labels
Area: browserThe browser moduleThe browser module