Class: Puppeteer::FunctionLocator

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

Constant Summary

Constants inherited from Locator

Locator::RETRY_DELAY_SECONDS

Class Method Summary collapse

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, #set_ensure_element_is_in_the_viewport, #set_timeout, #set_visibility, #set_wait_for_enabled, #set_wait_for_stable_bounding_box, #timeout, #wait, #wait_handle

Methods included from EventCallbackable

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

Constructor Details

#initialize(page_or_frame, func) ⇒ FunctionLocator

Returns a new instance of FunctionLocator.



539
540
541
542
543
# File 'lib/puppeteer/locators.rb', line 539

def initialize(page_or_frame, func)
  super()
  @page_or_frame = page_or_frame
  @func = func
end

Class Method Details

.create(page_or_frame, func) ⇒ Object



535
536
537
# File 'lib/puppeteer/locators.rb', line 535

def self.create(page_or_frame, func)
  new(page_or_frame, func).set_timeout(default_timeout_for(page_or_frame))
end