mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
docs: improve waitForElementState documentation (#4883)
This commit is contained in:
parent
d8187bb5af
commit
0f8d7ec0a6
@ -3846,7 +3846,7 @@ When all steps combined have not finished during the specified [`option: timeout
|
||||
|
||||
## async method: ElementHandle.waitForElementState
|
||||
|
||||
Returns the element satisfies the [`param: state`].
|
||||
Returns when the element satisfies the [`param: state`].
|
||||
|
||||
Depending on the [`param: state`] parameter, this method waits for one of the [actionability](./actionability.md)
|
||||
checks to pass. This method throws when the element is detached while waiting, unless waiting for the `"hidden"` state.
|
||||
@ -3868,7 +3868,7 @@ A state to wait for, see below for more details.
|
||||
## async method: ElementHandle.waitForSelector
|
||||
- returns: <[null]|[ElementHandle]>
|
||||
|
||||
Returns element specified by selector satisfies [`option: state`] option. Returns `null` if waiting for `hidden` or
|
||||
Returns element specified by selector when it satisfies [`option: state`] option. Returns `null` if waiting for `hidden` or
|
||||
`detached`.
|
||||
|
||||
Wait for the [`param: selector`] relative to the element handle to satisfy [`option: state`] option (either
|
||||
|
5
types/types.d.ts
vendored
5
types/types.d.ts
vendored
@ -5407,7 +5407,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
|
||||
$$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
|
||||
|
||||
/**
|
||||
* Returns element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or `detached`.
|
||||
* Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
|
||||
* `detached`.
|
||||
*
|
||||
* Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom, or
|
||||
* become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the method
|
||||
@ -6196,7 +6197,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* Returns the element satisfies the `state`.
|
||||
* Returns when the element satisfies the `state`.
|
||||
*
|
||||
* Depending on the `state` parameter, this method waits for one of the [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks to pass.
|
||||
* This method throws when the element is detached while waiting, unless waiting for the `"hidden"` state.
|
||||
|
Loading…
Reference in New Issue
Block a user