Class: Appium::Support::EventFiringBridge

Inherits:
Selenium::WebDriver::Support::EventFiringBridge
  • Object
show all
Defined in:
lib/appium_lib_core/support/event_firing_bridge.rb

Instance Method Summary collapse

Constructor Details

#initialize(delegate, listener, **opts) ⇒ EventFiringBridge

This module inherits ::Selenium::WebDriver::Support::EventFiringBridge to provide customer listener availability. github.com/SeleniumHQ/selenium/blob/trunk/rb/lib/selenium/webdriver/support/event_firing_bridge.rb#L79



22
23
24
25
# File 'lib/appium_lib_core/support/event_firing_bridge.rb', line 22

def initialize(delegate, listener, **opts)
  @appium_options = opts
  super delegate, listener
end

Instance Method Details

#find_element_by(how, what, parent = nil) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/appium_lib_core/support/event_firing_bridge.rb', line 27

def find_element_by(how, what, parent = nil)
  e = dispatch(:find, how, what, driver) do
    @delegate.find_element_by how, what, parent
  end

  ::Appium::Core::Element.new self, e.ref.last
end

#find_elements_by(how, what, parent = nil) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/appium_lib_core/support/event_firing_bridge.rb', line 35

def find_elements_by(how, what, parent = nil)
  es = dispatch(:find, how, what, driver) do
    @delegate.find_elements_by(how, what, parent)
  end

  es.map { |e| ::Appium::Core::Element.new self, e.ref.last }
end