Playwright::Page::WaitForSelectorOptions
Inherits JSON::Serializable / Reference / Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(state : Playwright::Page::WaitForSelectorOptions::State | Nil = nil, timeout : Int32 | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
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.
state=(state : State | Nil)
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.
timeout
Maximum time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the browserContext.setDefaultTimeout(timeout) or page.setDefaultTimeout(timeout) methods.