mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: add an internal page.locatorRace (#10512)
This commit is contained in:
@@ -835,6 +835,15 @@ export class Page extends EventEmitter {
|
||||
return Locator.create(this, selector);
|
||||
}
|
||||
|
||||
/**
|
||||
* A shortcut for {@link Locator.race} that does not require static imports.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
locatorRace(locators: Locator[]): Locator {
|
||||
return Locator.race(locators);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs `document.querySelector` within the page. If no element matches the
|
||||
* selector, the return value resolves to `null`.
|
||||
|
||||
Reference in New Issue
Block a user