Package com.microsoft.playwright
Class ElementHandle.WaitForSelectorOptions
java.lang.Object
com.microsoft.playwright.ElementHandle.WaitForSelectorOptions
- Enclosing interface:
ElementHandle
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetState(WaitForSelectorState state) Defaults to"visible".setStrict(boolean strict) When true, the call requires selector to resolve to a single element.setTimeout(double timeout) Maximum time in milliseconds.
-
Field Details
-
state
Defaults to"visible". Can be either:-
"attached"- wait for element to be present in DOM. -
"detached"- wait for element to not be present in DOM. -
"visible"- wait for element to have non-empty bounding box and novisibility:hidden. Note that element without any content or withdisplay:nonehas an empty bounding box and is not considered visible. -
"hidden"- wait for element to be either detached from DOM, or have an empty bounding box orvisibility:hidden. This is opposite to the"visible"option.
-
-
strict
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. -
timeout
Maximum time in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout. The default value can be changed by using theBrowserContext.setDefaultTimeout()orPage.setDefaultTimeout()methods.
-
-
Constructor Details
-
WaitForSelectorOptions
public WaitForSelectorOptions()
-
-
Method Details
-
setState
Defaults to"visible". Can be either:-
"attached"- wait for element to be present in DOM. -
"detached"- wait for element to not be present in DOM. -
"visible"- wait for element to have non-empty bounding box and novisibility:hidden. Note that element without any content or withdisplay:nonehas an empty bounding box and is not considered visible. -
"hidden"- wait for element to be either detached from DOM, or have an empty bounding box orvisibility:hidden. This is opposite to the"visible"option.
-
-
setStrict
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. -
setTimeout
Maximum time in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout. The default value can be changed by using theBrowserContext.setDefaultTimeout()orPage.setDefaultTimeout()methods.
-