Class: Selenium::WebDriver::Support::EventFiringBridge Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Support::EventFiringBridge
- Defined in:
- lib/selenium/webdriver/support/event_firing_bridge.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #clear_element(ref) ⇒ Object private
- #click_element(ref) ⇒ Object private
- #close ⇒ Object private
- #execute_script(script, *args) ⇒ Object private
- #find_element_by(how, what, parent = nil) ⇒ Object private
- #find_elements_by(how, what, parent = nil) ⇒ Object private
- #get(url) ⇒ Object private
- #go_back ⇒ Object private
- #go_forward ⇒ Object private
-
#initialize(delegate, listener) ⇒ EventFiringBridge
constructor
private
A new instance of EventFiringBridge.
- #quit ⇒ Object private
- #send_keys_to_element(ref, keys) ⇒ Object private
Constructor Details
#initialize(delegate, listener) ⇒ EventFiringBridge
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EventFiringBridge.
28 29 30 31 32 33 34 35 36 |
# File '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, *args, &blk) ⇒ Object (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
123 124 125 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 123 def method_missing(meth, *args, &blk) @delegate.__send__(meth, *args, &blk) end |
Instance Method Details
#clear_element(ref) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
62 63 64 65 66 |
# File '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) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
56 57 58 59 60 |
# File '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 ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
100 101 102 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 100 def close dispatch(:close, driver) { @delegate.close } end |
#execute_script(script, *args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
90 91 92 93 94 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 90 def execute_script(script, *args) dispatch(:execute_script, script, driver) do @delegate.execute_script(script, *args) end end |
#find_element_by(how, what, parent = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
74 75 76 77 78 79 80 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 74 def find_element_by(how, what, parent = nil) e = dispatch(:find, how, what, driver) do @delegate.find_element_by how, what, parent end Element.new self, e.ref end |
#find_elements_by(how, what, parent = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
82 83 84 85 86 87 88 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 82 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| Element.new self, e.ref } end |
#get(url) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 41 42 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 38 def get(url) dispatch(:navigate_to, url, driver) do @delegate.get(url) end end |
#go_back ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 53 54 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 50 def go_back dispatch(:navigate_back, driver) do @delegate.go_back end end |
#go_forward ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 48 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 44 def go_forward dispatch(:navigate_forward, driver) do @delegate.go_forward end end |
#quit ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
96 97 98 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 96 def quit dispatch(:quit, driver) { @delegate.quit } end |
#send_keys_to_element(ref, keys) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
68 69 70 71 72 |
# File '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 |