Modifier and Type | Field and Description |
---|---|
WaitForSelectorState |
state
Defaults to
"visible" . |
Double |
timeout
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
Constructor and Description |
---|
WaitForOptions() |
Modifier and Type | Method and Description |
---|---|
Locator.WaitForOptions |
setState(WaitForSelectorState state)
Defaults to
"visible" . |
Locator.WaitForOptions |
setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
public WaitForSelectorState state
"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 no visibility:hidden
. Note that element without any
content or with display: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 or visibility:hidden
. This
is opposite to the "visible"
option.public Double timeout
0
to disable timeout. The default value can be changed by
using the BrowserContext.setDefaultTimeout()
or Page.setDefaultTimeout()
methods.public Locator.WaitForOptions setState(WaitForSelectorState state)
"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 no visibility:hidden
. Note that element without any
content or with display: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 or visibility:hidden
. This
is opposite to the "visible"
option.public Locator.WaitForOptions setTimeout(double timeout)
0
to disable timeout. The default value can be changed by
using the BrowserContext.setDefaultTimeout()
or Page.setDefaultTimeout()
methods.Copyright © 2021. All rights reserved.