Class: Selenium::WebDriver::Remote::Bridge Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Remote::Bridge
- Includes:
- BridgeHelper
- Defined in:
- lib/selenium/webdriver/remote/bridge.rb,
lib/selenium/webdriver/remote/commands.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.
Direct Known Subclasses
Android::Bridge, Chrome::Bridge, Firefox::Bridge, IE::Bridge, IPhone::Bridge
Constant Summary collapse
- QUIT_ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[IOError]
Instance Attribute Summary collapse
- #capabilities ⇒ Object readonly private
- #context ⇒ Object private
- #http ⇒ Object private
Class Method Summary collapse
-
.command(name, verb, url) ⇒ Object
private
Defines a wrapper method for a command, which ultimately calls #execute.
Instance Method Summary collapse
-
#acceptAlert ⇒ Object
private
alerts.
- #addCookie(cookie) ⇒ Object private
- #browser ⇒ Object private
- #clearElement(element) ⇒ Object private
- #click ⇒ Object private
- #clickElement(element) ⇒ Object private
- #close ⇒ Object private
- #contextClick ⇒ Object private
- #create_session(desired_capabilities) ⇒ Object private
- #deleteAllCookies ⇒ Object private
- #deleteCookie(name) ⇒ Object private
- #dismissAlert ⇒ Object private
- #doubleClick ⇒ Object private
- #dragElement(element, right_by, down_by) ⇒ Object private
- #driver_extensions ⇒ Object private
- #elementEquals(element, other) ⇒ Object private
- #executeAsyncScript(script, *args) ⇒ Object private
- #executeScript(script, *args) ⇒ Object private
-
#findElementByClassName(parent, class_name) ⇒ Object
private
finding elements.
- #findElementByCssSelector(parent, selector) ⇒ Object private
- #findElementById(parent, id) ⇒ Object private
- #findElementByLinkText(parent, link_text) ⇒ Object private
- #findElementByName(parent, name) ⇒ Object private
- #findElementByPartialLinkText(parent, link_text) ⇒ Object private
- #findElementByTagName(parent, tag_name) ⇒ Object private
- #findElementByXpath(parent, xpath) ⇒ Object private
- #findElementsByClassName(parent, class_name) ⇒ Object private
- #findElementsByCssSelector(parent, selector) ⇒ Object private
- #findElementsById(parent, id) ⇒ Object private
- #findElementsByLinkText(parent, link_text) ⇒ Object private
- #findElementsByName(parent, name) ⇒ Object private
- #findElementsByPartialLinkText(parent, link_text) ⇒ Object private
- #findElementsByTagName(parent, tag_name) ⇒ Object private
- #findElementsByXpath(parent, xpath) ⇒ Object private
- #get(url) ⇒ Object private
- #getActiveElement ⇒ Object (also: #switchToActiveElement) private
- #getAlertText ⇒ Object private
- #getAllCookies ⇒ Object private
- #getCapabilities ⇒ Object private
- #getCurrentUrl ⇒ Object private
- #getCurrentWindowHandle ⇒ Object private
- #getElementAttribute(element, name) ⇒ Object private
- #getElementLocation(element) ⇒ Object private
- #getElementLocationOnceScrolledIntoView(element) ⇒ Object private
- #getElementSize(element) ⇒ Object private
- #getElementTagName(element) ⇒ Object private
- #getElementText(element) ⇒ Object private
- #getElementValue(element) ⇒ Object private
- #getElementValueOfCssProperty(element, prop) ⇒ Object private
- #getPageSource ⇒ Object private
- #getScreenshot ⇒ Object private
- #getTitle ⇒ Object private
- #getVisible ⇒ Object private
- #getWindowHandles ⇒ Object private
-
#goBack ⇒ Object
private
navigation.
- #goForward ⇒ Object private
-
#initialize(opts = {}) ⇒ Bridge
constructor
private
Initializes the bridge with the given server URL.
- #isElementDisplayed(element) ⇒ Object private
- #isElementEnabled(element) ⇒ Object private
- #isElementSelected(element) ⇒ Object private
- #mouseDown ⇒ Object private
- #mouseMoveTo(element, x = nil, y = nil) ⇒ Object private
- #mouseUp ⇒ Object private
- #quit ⇒ Object private
- #refresh ⇒ Object private
- #sendKeysToElement(element, keys) ⇒ Object private
- #sendModifierKeyToActiveElement(key, down) ⇒ Object private
-
#session_id ⇒ Object
private
Returns the current session ID.
- #setAlertValue(keys) ⇒ Object private
- #setElementSelected(element) ⇒ Object private
- #setImplicitWaitTimeout(milliseconds) ⇒ Object private
- #setScriptTimeout(milliseconds) ⇒ Object private
- #setVisible(bool) ⇒ Object private
- #submitElement(element) ⇒ Object private
- #switchToDefaultContent ⇒ Object private
- #switchToFrame(id) ⇒ Object private
- #switchToWindow(name) ⇒ Object private
- #toggleElement(element) ⇒ Object private
Methods included from BridgeHelper
#element_id_from, #parse_cookie_string, #unwrap_script_result
Constructor Details
#initialize(opts = {}) ⇒ Bridge
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.
Initializes the bridge with the given server URL.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 43 def initialize(opts = {}) opts = opts.dup http_client = opts.delete(:http_client) { Http::Default.new } desired_capabilities = opts.delete(:desired_capabilities) { Capabilities.firefox } url = opts.delete(:url) { "http://#{Platform.localhost}:4444/wd/hub" } unless opts.empty? raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}" end if desired_capabilities.kind_of?(Symbol) unless Capabilities.respond_to?(desired_capabilities) raise Error::WebDriverError, "invalid desired capability: #{desired_capabilities.inspect}" end desired_capabilities = Capabilities.send(desired_capabilities) end uri = url.kind_of?(URI) ? url : URI.parse(url) uri.path += "/" unless uri.path =~ /\/$/ http_client.server_url = uri @http = http_client @capabilities = create_session(desired_capabilities) end |
Instance Attribute Details
#capabilities ⇒ Object (readonly)
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.
33 34 35 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 33 def capabilities @capabilities end |
#context ⇒ 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 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 32 def context @context end |
#http ⇒ 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 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 32 def http @http end |
Class Method Details
.command(name, verb, 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.
Defines a wrapper method for a command, which ultimately calls #execute.
28 29 30 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 28 def self.command(name, verb, url) COMMANDS[name] = [verb, url.freeze] end |
Instance Method Details
#acceptAlert ⇒ 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.
alerts
114 115 116 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 114 def acceptAlert execute :acceptAlert end |
#addCookie(cookie) ⇒ 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.
215 216 217 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 215 def addCookie() execute :addCookie, {}, :cookie => end |
#browser ⇒ 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.
71 72 73 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 71 def browser @browser ||= @capabilities.browser_name.gsub(" ", "_").to_sym end |
#clearElement(element) ⇒ 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.
373 374 375 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 373 def clearElement(element) execute :clearElement, :id => element end |
#click ⇒ 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.
301 302 303 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 301 def click execute :click, {}, :button => 0 end |
#clickElement(element) ⇒ 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.
297 298 299 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 297 def clickElement(element) execute :clickElement, :id => element 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.
181 182 183 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 181 def close execute :close end |
#contextClick ⇒ 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.
309 310 311 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 309 def contextClick execute :click, {}, :button => 2 end |
#create_session(desired_capabilities) ⇒ 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.
87 88 89 90 91 92 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 87 def create_session(desired_capabilities) resp = raw_execute :newSession, {}, :desiredCapabilities => desired_capabilities @session_id = resp['sessionId'] || raise(Error::WebDriverError, 'no sessionId in returned payload') Capabilities.json_create resp['value'] end |
#deleteAllCookies ⇒ 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.
227 228 229 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 227 def deleteAllCookies execute :deleteAllCookies end |
#deleteCookie(name) ⇒ 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.
219 220 221 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 219 def deleteCookie(name) execute :deleteCookieNamed, :name => name end |
#dismissAlert ⇒ 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.
118 119 120 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 118 def dismissAlert execute :dismissAlert end |
#doubleClick ⇒ 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.
305 306 307 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 305 def doubleClick execute :doubleClick end |
#dragElement(element, right_by, down_by) ⇒ 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.
410 411 412 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 410 def dragElement(element, right_by, down_by) execute :dragElement, {:id => element}, :x => right_by, :y => down_by end |
#driver_extensions ⇒ 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.
75 76 77 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 75 def driver_extensions [DriverExtensions::HasInputDevices, DriverExtensions::TakesScreenshot] end |
#elementEquals(element, other) ⇒ 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.
414 415 416 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 414 def elementEquals(element, other) execute :elementEquals, :id => element.ref, :other => other.ref end |
#executeAsyncScript(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.
208 209 210 211 212 213 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 208 def executeAsyncScript(script, *args) assert_javascript_enabled result = execute :executeAsyncScript, {}, :script => script, :args => args unwrap_script_result result 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.
201 202 203 204 205 206 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 201 def executeScript(script, *args) assert_javascript_enabled result = execute :executeScript, {}, :script => script, :args => args unwrap_script_result result end |
#findElementByClassName(parent, class_name) ⇒ 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.
finding elements
233 234 235 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 233 def findElementByClassName(parent, class_name) find_element_by 'class name', class_name, parent end |
#findElementByCssSelector(parent, selector) ⇒ 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.
241 242 243 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 241 def findElementByCssSelector(parent, selector) find_element_by 'css selector', selector, parent end |
#findElementById(parent, id) ⇒ 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.
249 250 251 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 249 def findElementById(parent, id) find_element_by 'id', id, parent end |
#findElementByLinkText(parent, link_text) ⇒ 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.
257 258 259 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 257 def findElementByLinkText(parent, link_text) find_element_by 'link text', link_text, parent end |
#findElementByName(parent, name) ⇒ 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.
273 274 275 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 273 def findElementByName(parent, name) find_element_by 'name', name, parent end |
#findElementByPartialLinkText(parent, link_text) ⇒ 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.
265 266 267 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 265 def findElementByPartialLinkText(parent, link_text) find_element_by 'partial link text', link_text, parent end |
#findElementByTagName(parent, tag_name) ⇒ 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.
281 282 283 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 281 def findElementByTagName(parent, tag_name) find_element_by 'tag name', tag_name, parent end |
#findElementByXpath(parent, xpath) ⇒ 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.
289 290 291 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 289 def findElementByXpath(parent, xpath) find_element_by 'xpath', xpath, parent end |
#findElementsByClassName(parent, class_name) ⇒ 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.
237 238 239 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 237 def findElementsByClassName(parent, class_name) find_elements_by 'class name', class_name, parent end |
#findElementsByCssSelector(parent, selector) ⇒ 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.
245 246 247 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 245 def findElementsByCssSelector(parent, selector) find_elements_by 'css selector', selector, parent end |
#findElementsById(parent, id) ⇒ 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.
253 254 255 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 253 def findElementsById(parent, id) find_elements_by 'id', id, parent end |
#findElementsByLinkText(parent, link_text) ⇒ 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.
261 262 263 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 261 def findElementsByLinkText(parent, link_text) find_elements_by 'link text', link_text, parent end |
#findElementsByName(parent, name) ⇒ 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.
277 278 279 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 277 def findElementsByName(parent, name) find_elements_by 'name', name, parent end |
#findElementsByPartialLinkText(parent, link_text) ⇒ 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.
269 270 271 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 269 def findElementsByPartialLinkText(parent, link_text) find_elements_by 'partial link text', link_text, parent end |
#findElementsByTagName(parent, tag_name) ⇒ 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.
285 286 287 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 285 def findElementsByTagName(parent, tag_name) find_elements_by 'tag name', tag_name, parent end |
#findElementsByXpath(parent, xpath) ⇒ 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.
293 294 295 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 293 def findElementsByXpath(parent, xpath) find_elements_by 'xpath', xpath, parent 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.
94 95 96 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 94 def get(url) execute :get, {}, :url => url end |
#getActiveElement ⇒ Object Also known as: switchToActiveElement
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.
405 406 407 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 405 def getActiveElement Element.new self, element_id_from(execute(:getActiveElement)) end |
#getAlertText ⇒ 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.
126 127 128 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 126 def getAlertText execute :getAlertText end |
#getAllCookies ⇒ 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.
223 224 225 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 223 def getAllCookies execute :getAllCookies end |
#getCapabilities ⇒ 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.
98 99 100 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 98 def getCapabilities Capabilities.json_create execute(:getCapabilities) end |
#getCurrentUrl ⇒ 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.
142 143 144 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 142 def getCurrentUrl execute :getCurrentUrl end |
#getCurrentWindowHandle ⇒ 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.
193 194 195 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 193 def getCurrentWindowHandle execute :getCurrentWindowHandle end |
#getElementAttribute(element, name) ⇒ 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.
339 340 341 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 339 def getElementAttribute(element, name) execute :getElementAttribute, :id => element, :name => name end |
#getElementLocation(element) ⇒ 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.
351 352 353 354 355 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 351 def getElementLocation(element) data = execute :getElementLocation, :id => element Point.new data['x'], data['y'] end |
#getElementLocationOnceScrolledIntoView(element) ⇒ 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.
357 358 359 360 361 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 357 def getElementLocationOnceScrolledIntoView(element) data = execute :getElementLocationOnceScrolledIntoView, :id => element Point.new data['x'], data['y'] end |
#getElementSize(element) ⇒ 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.
363 364 365 366 367 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 363 def getElementSize(element) data = execute :getElementSize, :id => element Dimension.new data['width'], data['height'] end |
#getElementTagName(element) ⇒ 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.
335 336 337 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 335 def getElementTagName(element) execute :getElementTagName, :id => element end |
#getElementText(element) ⇒ 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.
347 348 349 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 347 def getElementText(element) execute :getElementText, :id => element end |
#getElementValue(element) ⇒ 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.
343 344 345 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 343 def getElementValue(element) execute :getElementValue, :id => element end |
#getElementValueOfCssProperty(element, prop) ⇒ 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.
401 402 403 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 401 def getElementValueOfCssProperty(element, prop) execute :getElementValueOfCssProperty, :id => element, :property_name => prop end |
#getPageSource ⇒ 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.
150 151 152 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 150 def getPageSource execute :getPageSource end |
#getScreenshot ⇒ 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.
197 198 199 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 197 def getScreenshot execute :screenshot end |
#getTitle ⇒ 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.
146 147 148 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 146 def getTitle execute :getTitle end |
#getVisible ⇒ 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.
154 155 156 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 154 def getVisible execute :getVisible end |
#getWindowHandles ⇒ 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.
189 190 191 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 189 def getWindowHandles execute :getWindowHandles 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.
navigation
134 135 136 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 134 def goBack execute :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.
138 139 140 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 138 def goForward execute :goForward end |
#isElementDisplayed(element) ⇒ 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.
385 386 387 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 385 def isElementDisplayed(element) execute :isElementDisplayed, :id => element end |
#isElementEnabled(element) ⇒ 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.
377 378 379 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 377 def isElementEnabled(element) execute :isElementEnabled, :id => element end |
#isElementSelected(element) ⇒ 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.
381 382 383 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 381 def isElementSelected(element) execute :isElementSelected, :id => element end |
#mouseDown ⇒ 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.
313 314 315 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 313 def mouseDown execute :mouseDown end |
#mouseMoveTo(element, x = nil, y = 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.
321 322 323 324 325 326 327 328 329 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 321 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
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.
317 318 319 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 317 def mouseUp execute :mouseUp 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.
176 177 178 179 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 176 def quit execute :quit rescue *QUIT_ERRORS end |
#refresh ⇒ 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.
185 186 187 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 185 def refresh execute :refresh end |
#sendKeysToElement(element, 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.
369 370 371 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 369 def sendKeysToElement(element, keys) execute :sendKeysToElement, {:id => element}, {:value => keys} end |
#sendModifierKeyToActiveElement(key, down) ⇒ 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.
331 332 333 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 331 def sendModifierKeyToActiveElement(key, down) execute :sendModifierKeyToActiveElement, {}, :value => key, :isdown => down end |
#session_id ⇒ 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.
Returns the current session ID.
83 84 85 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 83 def session_id @session_id || raise(Error::WebDriverError, "no current session exists") end |
#setAlertValue(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.
122 123 124 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 122 def setAlertValue(keys) execute :setAlertValue, {}, :text => keys.to_s end |
#setElementSelected(element) ⇒ 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.
397 398 399 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 397 def setElementSelected(element) execute :setElementSelected, :id => element end |
#setImplicitWaitTimeout(milliseconds) ⇒ 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.
102 103 104 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 102 def setImplicitWaitTimeout(milliseconds) execute :setImplicitWaitTimeout, {}, :ms => milliseconds end |
#setScriptTimeout(milliseconds) ⇒ 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.
106 107 108 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 106 def setScriptTimeout(milliseconds) execute :setScriptTimeout, {}, :ms => milliseconds end |
#setVisible(bool) ⇒ 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.
158 159 160 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 158 def setVisible(bool) execute :setVisible, {}, bool end |
#submitElement(element) ⇒ 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.
389 390 391 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 389 def submitElement(element) execute :submitElement, :id => element end |
#switchToDefaultContent ⇒ 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.
170 171 172 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 170 def switchToDefaultContent execute :switchToFrame, {}, :id => nil end |
#switchToFrame(id) ⇒ 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.
166 167 168 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 166 def switchToFrame(id) execute :switchToFrame, {}, :id => id end |
#switchToWindow(name) ⇒ 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.
162 163 164 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 162 def switchToWindow(name) execute :switchToWindow, {}, :name => name end |
#toggleElement(element) ⇒ 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.
393 394 395 |
# File 'lib/selenium/webdriver/remote/bridge.rb', line 393 def toggleElement(element) execute :toggleElement, :id => element end |