fix: add an internal page.locatorRace (#10512)

This commit is contained in:
Alex Rudenko
2023-07-06 09:24:19 +02:00
committed by GitHub
parent fa412292be
commit 56a97dd2fb
2 changed files with 10 additions and 1 deletions

View File

@@ -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`.