puppeteer/docs/api/puppeteer.locator.race.md

26 lines
512 B
Markdown
Raw Normal View History

2023-06-07 10:45:02 +00:00
---
sidebar_label: Locator.race
---
# Locator.race() method
Creates a race between multiple locators but ensures that only a single one acts.
#### Signature:
```typescript
class Locator {
static race(locators: Locator[]): Locator;
}
```
## Parameters
| Parameter | Type | Description |
| --------- | ------------------------------------- | ----------- |
| locators | [Locator](./puppeteer.locator.md)\[\] | |
**Returns:**
[Locator](./puppeteer.locator.md)