Class: Selenium::WebDriver::Support::EventFiringBridge Private

Inherits:
Object
  • Object
show all
Defined in:
rb/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)

Constructor Details

- (EventFiringBridge) initialize(delegate, listener)

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 'rb/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

- (Object) method_missing(meth, *args, &blk) (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.



105
106
107
# File 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 105

def method_missing(meth, *args, &blk)
  @delegate.__send__(meth, *args, &blk)
end

Instance Method Details

- (Object) clearElement(ref)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 44

def clearElement(ref)
  dispatch(:change_value_of, create_element(ref), driver) {
    @delegate.clearElement(ref)
  }
end

- (Object) clickElement(ref)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 38

def clickElement(ref)
  dispatch(:click, create_element(ref), driver) {
    @delegate.clickElement(ref)
  }
end

- (Object) close

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 82

def close
  dispatch(:close, driver) { @delegate.close }
end

- (Object) executeScript(script, *args)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 72

def executeScript(script, *args)
  dispatch(:execute_script, script, driver) {
    @delegate.executeScript(script, *args)
  }
end

- (Object) find_element_by(how, what, parent = nil)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 56

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

  Element.new self, e.ref
end

- (Object) find_elements_by(how, what, parent = nil)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 64

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

  es.map { |e| Element.new self, e.ref }
end

- (Object) get(url)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 20

def get(url)
  dispatch(:navigate_to, url, driver) {
    @delegate.get(url)
  }
end

- (Object) goBack

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 32

def goBack
  dispatch(:navigate_back, driver) {
    @delegate.goBack
  }
end

- (Object) goForward

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 26

def goForward
  dispatch(:navigate_forward, driver) {
    @delegate.goForward
  }
end

- (Object) quit

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 78

def quit
  dispatch(:quit, driver) { @delegate.quit }
end

- (Object) sendKeysToElement(ref, keys)

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 'rb/lib/selenium/webdriver/support/event_firing_bridge.rb', line 50

def sendKeysToElement(ref, keys)
  dispatch(:change_value_of, create_element(ref), driver) {
    @delegate.sendKeysToElement(ref, keys)
  }
end