Class: Puppeteer::Bidi::DelegatedLocator

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

Overview

Abstract locator that delegates to another locator.

Direct Known Subclasses

FilteredLocator, MappedLocator

Constant Summary

Constants inherited from Locator

Locator::RETRY_DELAY

Instance Attribute Summary collapse

Attributes inherited from Locator

#ensure_element_is_in_viewport, #timeout, #visibility, #wait_for_enabled, #wait_for_stable_bounding_box

Instance Method Summary collapse

Methods inherited from Locator

#_clone, #_wait, #build_deadline, #click, #clone, #copy_options, #ensure_element_is_in_viewport?, #ensure_element_is_in_viewport_if_needed, #fill, #fill_directly, #filter, #hover, #map, #map_handle, #off, #on, #once, #perform_action, race, #raise_timeout, #remaining_time_ms, #scroll, #wait, #wait_for_enabled?, #wait_for_enabled_if_needed, #wait_for_stable_bounding_box?, #wait_for_stable_bounding_box_if_needed, #wait_handle, #wait_until, #with_retry

Constructor Details

#initialize(delegate) ⇒ DelegatedLocator

Returns a new instance of DelegatedLocator.

Parameters:

  • delegate (Object)


574
575
576
577
578
# File 'lib/puppeteer/bidi/locator.rb', line 574

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

Instance Attribute Details

#delegateObject

Returns the value of attribute delegate.

Returns:

  • (Object)


612
613
614
# File 'lib/puppeteer/bidi/locator.rb', line 612

def delegate
  @delegate
end

Instance Method Details

#set_ensure_element_is_in_the_viewport(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


598
599
600
601
602
# File 'lib/puppeteer/bidi/locator.rb', line 598

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

#set_timeout(timeout) ⇒ Object

Parameters:

  • timeout (Object)

Returns:

  • (Object)


580
581
582
583
584
# File 'lib/puppeteer/bidi/locator.rb', line 580

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

#set_visibility(visibility) ⇒ Object

Parameters:

  • visibility (Object)

Returns:

  • (Object)


586
587
588
589
590
# File 'lib/puppeteer/bidi/locator.rb', line 586

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

#set_wait_for_enabled(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


592
593
594
595
596
# File 'lib/puppeteer/bidi/locator.rb', line 592

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

#set_wait_for_stable_bounding_box(value) ⇒ Object

Parameters:

  • value (Object)

Returns:

  • (Object)


604
605
606
607
608
# File 'lib/puppeteer/bidi/locator.rb', line 604

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