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
- #clearElement(ref) ⇒ Object private
- #clickElement(ref) ⇒ Object private
- #close ⇒ Object private
- #executeScript(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
- #goBack ⇒ Object private
- #goForward ⇒ Object private
-
#initialize(delegate, listener) ⇒ EventFiringBridge
constructor
private
A new instance of EventFiringBridge.
- #quit ⇒ Object private
- #sendKeysToElement(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.
10 11 12 13 14 15 16 17 18 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 10 def initialize(delegate, listener) @delegate = delegate if listener.respond_to? :call @listener = BlockEventListener.new(listener) else @listener = 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.
101 102 103 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 101 def method_missing(meth, *args, &blk) @delegate.__send__(meth, *args, &blk) end |
Instance Method Details
#clearElement(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.
44 45 46 47 48 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 44 def clearElement(ref) dispatch(:change_value_of, create_element(ref)) { @delegate.clearElement(ref) } end |
#clickElement(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.
38 39 40 41 42 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 38 def clickElement(ref) dispatch(:click, create_element(ref)) { @delegate.clickElement(ref) } 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.
82 83 84 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 82 def close dispatch(:close) { @delegate.close } end |
#executeScript(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.
72 73 74 75 76 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 72 def executeScript(script, *args) dispatch(:execute_script, script) { @delegate.executeScript(script, *args) } 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.
56 57 58 59 60 61 62 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 56 def find_element_by(how, what, parent = nil) e = dispatch(:find, how, what) { @delegate.find_element_by how, what, parent } 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.
64 65 66 67 68 69 70 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 64 def find_elements_by(how, what, parent = nil) es = dispatch(:find, how, what) { @delegate.find_elements_by(how, what, parent) } 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.
20 21 22 23 24 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 20 def get(url) dispatch(:navigate_to, url) { @delegate.get(url) } end |
#goBack ⇒ 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.
32 33 34 35 36 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 32 def goBack dispatch(:navigate_back) { @delegate.goBack } end |
#goForward ⇒ 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.
26 27 28 29 30 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 26 def goForward dispatch(:navigate_forward) { @delegate.goForward } 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.
78 79 80 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 78 def quit dispatch(:quit) { @delegate.quit } end |
#sendKeysToElement(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.
50 51 52 53 54 |
# File 'lib/selenium/webdriver/support/event_firing_bridge.rb', line 50 def sendKeysToElement(ref, keys) dispatch(:change_value_of, create_element(ref)) { @delegate.sendKeysToElement(ref, keys) } end |