Package com.microsoft.playwright
Class Locator.WaitForOptions
- java.lang.Object
-
- com.microsoft.playwright.Locator.WaitForOptions
-
-
Field Summary
Fields Modifier and Type Field Description WaitForSelectorState
state
Defaults to"visible"
.Double
timeout
Maximum time in milliseconds, defaults to 30 seconds, pass0
to disable timeout.
-
Constructor Summary
Constructors Constructor Description WaitForOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locator.WaitForOptions
setState(WaitForSelectorState state)
Defaults to"visible"
.Locator.WaitForOptions
setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass0
to disable timeout.
-
-
-
Field Detail
-
state
public WaitForSelectorState 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:none
has 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.
-
-
timeout
public Double timeout
Maximum time in milliseconds, defaults to 30 seconds, pass0
to disable timeout. The default value can be changed by using theBrowserContext.setDefaultTimeout()
orPage.setDefaultTimeout()
methods.
-
-
Method Detail
-
setState
public Locator.WaitForOptions setState(WaitForSelectorState 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:none
has 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.
-
-
setTimeout
public Locator.WaitForOptions setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass0
to disable timeout. The default value can be changed by using theBrowserContext.setDefaultTimeout()
orPage.setDefaultTimeout()
methods.
-
-