Module: Selenium::WebDriver::Edge::LegacySupport
- Defined in:
- lib/selenium/webdriver/edge/legacy_support.rb
Instance Method Summary collapse
- #click ⇒ Object
- #contextClick ⇒ Object
- #doubleClick ⇒ Object
- #executeAsyncScript(script, *args) ⇒ Object
- #executeScript(script, *args) ⇒ Object
- #getCurrentWindowHandle ⇒ Object
- #getWindowPosition(handle = :current) ⇒ Object
- #getWindowSize(handle = :current) ⇒ Object
- #maximizeWindow(handle = :current) ⇒ Object
- #mouseDown ⇒ Object
- #mouseMoveTo(element, x = nil, y = nil) ⇒ Object
- #mouseUp ⇒ Object
- #sendKeysToActiveElement(key) ⇒ Object
- #setWindowPosition(x, y, handle = :current) ⇒ Object
- #setWindowSize(width, height, handle = :current) ⇒ Object
- #submitElement(element) ⇒ Object
Instance Method Details
#click ⇒ Object
52 53 54 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 52 def click execute :click, {}, :button => 0 end |
#contextClick ⇒ Object
56 57 58 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 56 def contextClick execute :click, {}, :button => 2 end |
#doubleClick ⇒ Object
48 49 50 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 48 def doubleClick execute :doubleClick end |
#executeAsyncScript(script, *args) ⇒ Object
39 40 41 42 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 39 def executeAsyncScript(script, *args) result = execute :executeAsyncScript, {}, :script => script, :args => args unwrap_script_result result end |
#executeScript(script, *args) ⇒ Object
34 35 36 37 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 34 def executeScript(script, *args) result = execute :executeScript, {}, :script => script, :args => args unwrap_script_result result end |
#getCurrentWindowHandle ⇒ Object
82 83 84 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 82 def getCurrentWindowHandle execute :getCurrentWindowHandle end |
#getWindowPosition(handle = :current) ⇒ Object
98 99 100 101 102 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 98 def getWindowPosition(handle = :current) data = execute :getWindowPosition, :window_handle => handle Point.new data['x'], data['y'] end |
#getWindowSize(handle = :current) ⇒ Object
86 87 88 89 90 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 86 def getWindowSize(handle = :current) data = execute :getWindowSize, :window_handle => handle Dimension.new data['width'], data['height'] end |
#maximizeWindow(handle = :current) ⇒ Object
109 110 111 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 109 def maximizeWindow(handle = :current) execute :maximizeWindow, :window_handle => handle end |
#mouseDown ⇒ Object
60 61 62 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 60 def mouseDown execute :mouseDown end |
#mouseMoveTo(element, x = nil, y = nil) ⇒ Object
68 69 70 71 72 73 74 75 76 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 68 def mouseMoveTo(element, x = nil, y = nil) params = { :element => element } if x && y params.merge! :xoffset => x, :yoffset => y end execute :mouseMoveTo, {}, params end |
#mouseUp ⇒ Object
64 65 66 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 64 def mouseUp execute :mouseUp end |
#sendKeysToActiveElement(key) ⇒ Object
78 79 80 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 78 def sendKeysToActiveElement(key) execute :sendKeysToActiveElement, {}, :value => key end |
#setWindowPosition(x, y, handle = :current) ⇒ Object
104 105 106 107 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 104 def setWindowPosition(x, y, handle = :current) execute :setWindowPosition, {:window_handle => handle}, :x => x, :y => y end |
#setWindowSize(width, height, handle = :current) ⇒ Object
92 93 94 95 96 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 92 def setWindowSize(width, height, handle = :current) execute :setWindowSize, {:window_handle => handle}, :width => width, :height => height end |
#submitElement(element) ⇒ Object
44 45 46 |
# File 'lib/selenium/webdriver/edge/legacy_support.rb', line 44 def submitElement(element) execute :submitElement, :id => element end |