Class: Selenium::WebDriver::Support::EventFiringBridge Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rb/lib/selenium/webdriver/support/event_firing_bridge.rb |
Class Method Summary
- .new(delegate, listener) ⇒ EventFiringBridge constructor Internal use only
Instance Method Summary
- #clear_element(ref) Internal use only
- #click_element(ref) Internal use only
- #close Internal use only
- #execute_script(script, *args) Internal use only
- #find_element_by(how, what, parent = nil) Internal use only
- #find_elements_by(how, what, parent = nil) Internal use only
- #get(url) Internal use only
- #go_back Internal use only
- #go_forward Internal use only
- #quit Internal use only
- #send_keys_to_element(ref, keys) Internal use only
- #create_element(ref) private Internal use only
- #dispatch(name, *args) private Internal use only
- #driver private Internal use only
- #method_missing(meth) private Internal use only
Constructor Details
.new(delegate, listener) ⇒ EventFiringBridge
# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 28
def initialize(delegate, listener) @delegate = delegate @listener = if listener.respond_to? :call BlockEventListener.new(listener) else listener end end
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth) (private)
[ GitHub ]# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 123
def method_missing(meth, ...) # rubocop:disable Style/MissingRespondToMissing @delegate.__send__(meth, ...) end
Instance Method Details
#clear_element(ref)
[ GitHub ]# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 62
def clear_element(ref) dispatch(:change_value_of, create_element(ref), driver) do @delegate.clear_element(ref) end end
#click_element(ref)
[ GitHub ]# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 56
def click_element(ref) dispatch(:click, create_element(ref), driver) do @delegate.click_element(ref) end end
#close
[ GitHub ]#create_element(ref) (private)
[ GitHub ]#dispatch(name, *args) (private)
[ GitHub ]# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 115
def dispatch(name, *args) @listener.__send__(:"before_#{name}", *args) returned = yield @listener.__send__(:"after_#{name}", *args) returned end
#driver (private)
[ GitHub ]#execute_script(script, *args)
[ GitHub ]#find_element_by(how, what, parent = nil)
[ GitHub ]#find_elements_by(how, what, parent = nil)
[ GitHub ]#get(url)
[ GitHub ]#go_back
[ GitHub ]#go_forward
[ GitHub ]#quit
[ GitHub ]#send_keys_to_element(ref, keys)
[ GitHub ]# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 68
def send_keys_to_element(ref, keys) dispatch(:change_value_of, create_element(ref), driver) do @delegate.send_keys_to_element(ref, keys) end end