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 {
|
2023-07-19 15:39:38 +00:00
|
|
|
static race<Locators extends Array<Locator<unknown>>>(
|
|
|
|
locators: Locators
|
|
|
|
): Locator<UnionLocatorOf<Locators>>;
|
2023-06-07 10:45:02 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2023-07-19 15:39:38 +00:00
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | -------- | ----------- |
|
|
|
|
| locators | Locators | |
|
2023-06-07 10:45:02 +00:00
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2023-07-20 13:06:42 +00:00
|
|
|
[Locator](./puppeteer.locator.md)<[UnionLocatorOf](./puppeteer.unionlocatorof.md)<Locators>>
|