class Playwright::ElementHandle::WaitForSelectorOptions

Included Modules

Defined in:

playwright/elementhandle.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(state : Playwright::ElementHandle::WaitForSelectorOptions::State | Nil = nil, timeout : Int32 | Nil = nil) #

[View source]

Instance Method Detail

def 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 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.

[View source]
def 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 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.

[View source]
def timeout : Int32 | Nil #

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.


[View source]
def timeout=(timeout : Int32 | Nil) #

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.


[View source]