mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: deprecate page.waitForNavigation, locator.elementHandle (#19977)
This commit is contained in:
parent
3c8bc0b2f9
commit
6022a4098f
@ -643,6 +643,7 @@ Locator of the element to drag to.
|
||||
|
||||
## async method: Locator.elementHandle
|
||||
* since: v1.14
|
||||
* discouraged: Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
|
||||
- returns: <[ElementHandle]>
|
||||
|
||||
Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If multiple elements match the locator, throws.
|
||||
@ -652,6 +653,7 @@ Resolves given locator to the first matching DOM element. If there are no matchi
|
||||
|
||||
## async method: Locator.elementHandles
|
||||
* since: v1.14
|
||||
* discouraged: Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
|
||||
- returns: <[Array]<[ElementHandle]>>
|
||||
|
||||
Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.
|
||||
|
@ -4031,6 +4031,7 @@ Console.WriteLine(await popup.TitleAsync()); // popup is ready to use.
|
||||
|
||||
## async method: Page.waitForNavigation
|
||||
* since: v1.8
|
||||
* deprecated: This method is inherently racy, please use [`method: Page.waitForURL`] instead.
|
||||
* langs:
|
||||
* alias-python: expect_navigation
|
||||
* alias-csharp: RunAndWaitForNavigation
|
||||
|
6
packages/playwright-core/types/types.d.ts
vendored
6
packages/playwright-core/types/types.d.ts
vendored
@ -4462,6 +4462,8 @@ export interface Page {
|
||||
*
|
||||
* **NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
|
||||
* is considered a navigation.
|
||||
* @deprecated This method is inherently racy, please use
|
||||
* [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url) instead.
|
||||
* @param options
|
||||
*/
|
||||
waitForNavigation(options?: {
|
||||
@ -10085,6 +10087,8 @@ export interface Locator {
|
||||
*/
|
||||
evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
|
||||
/**
|
||||
* **NOTE** Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
|
||||
*
|
||||
* Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If
|
||||
* multiple elements match the locator, throws.
|
||||
* @param options
|
||||
@ -10614,6 +10618,8 @@ export interface Locator {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* **NOTE** Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
|
||||
*
|
||||
* Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.
|
||||
*/
|
||||
elementHandles(): Promise<Array<ElementHandle>>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user