Class: Puppeteer::DelegatedLocator

Inherits:
Locator
  • Object
show all
Defined in:
lib/puppeteer/locators.rb,
sig/puppeteer/locators.rbs

Direct Known Subclasses

FilteredLocator, MappedLocator

Constant Summary

Constants inherited from Locator

Locator::RETRY_DELAY_SECONDS

Instance Method Summary collapse

Methods inherited from Locator

#click, #clone, #copy_options, #fill, #filter, #filter_handle, function_string?, #hover, #map, #map_handle, #on, #once, race, #scroll, #timeout, #wait, #wait_handle

Methods included from EventCallbackable

#add_event_listener, #emit_event, #observe_first, #off, #on_event, #remove_event_listener

Constructor Details

#initialize(delegate) ⇒ DelegatedLocator

Returns a new instance of DelegatedLocator.

Parameters:

  • delegate (Object)


593
594
595
596
597
# File 'lib/puppeteer/locators.rb', line 593

def initialize(delegate)
  super()
  @delegate = delegate
  copy_options(@delegate)
end

Instance Method Details

#_cloneObject

Returns:

  • (Object)

Raises:

  • (NotImplementedError)


633
634
635
# File 'lib/puppeteer/locators.rb', line 633

protected def _clone
  raise NotImplementedError
end

#_wait(_options) ⇒ Object

Parameters:

  • _options (Object)

Returns:

  • (Object)

Raises:

  • (NotImplementedError)


637
638
639
# File 'lib/puppeteer/locators.rb', line 637

protected def _wait(_options)
  raise NotImplementedError
end

#delegateObject

Returns:

  • (Object)


599
600
601
# File 'lib/puppeteer/locators.rb', line 599

protected def delegate
  @delegate
end

#set_ensure_element_is_in_the_viewport(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


621
622
623
624
625
# File 'lib/puppeteer/locators.rb', line 621

def set_ensure_element_is_in_the_viewport(value)
  locator = super
  locator.instance_variable_set(:@delegate, @delegate.set_ensure_element_is_in_the_viewport(value))
  locator
end

#set_timeout(timeout) ⇒ Object

Parameters:

  • timeout (Object)

Returns:

  • (Object)


603
604
605
606
607
# File 'lib/puppeteer/locators.rb', line 603

def set_timeout(timeout)
  locator = super
  locator.instance_variable_set(:@delegate, @delegate.set_timeout(timeout))
  locator
end

#set_visibility(visibility) ⇒ Object

Parameters:

  • visibility (Object)

Returns:

  • (Object)


609
610
611
612
613
# File 'lib/puppeteer/locators.rb', line 609

def set_visibility(visibility)
  locator = super
  locator.instance_variable_set(:@delegate, @delegate.set_visibility(visibility))
  locator
end

#set_wait_for_enabled(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


615
616
617
618
619
# File 'lib/puppeteer/locators.rb', line 615

def set_wait_for_enabled(value)
  locator = super
  locator.instance_variable_set(:@delegate, @delegate.set_wait_for_enabled(value))
  locator
end

#set_wait_for_stable_bounding_box(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


627
628
629
630
631
# File 'lib/puppeteer/locators.rb', line 627

def set_wait_for_stable_bounding_box(value)
  locator = super
  locator.instance_variable_set(:@delegate, @delegate.set_wait_for_stable_bounding_box(value))
  locator
end