Class: Selenium::WebDriver::Chrome::Bridge Private

Inherits:
Remote::Bridge show all
Defined in:
lib/selenium/webdriver/chrome/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.

Constant Summary

Constants inherited from Remote::Bridge

Remote::Bridge::QUIT_ERRORS

Instance Attribute Summary

Attributes inherited from Remote::Bridge

#context, #http

Instance Method Summary collapse

Methods inherited from Remote::Bridge

#acceptAlert, #addCookie, #clearElement, #click, #clickElement, #close, command, #contextClick, #create_session, #deleteAllCookies, #dismissAlert, #doubleClick, #dragElement, #executeAsyncScript, #executeScript, #findElementByClassName, #findElementByCssSelector, #findElementById, #findElementByLinkText, #findElementByName, #findElementByPartialLinkText, #findElementByTagName, #findElementByXpath, #findElementsByClassName, #findElementsByCssSelector, #findElementsById, #findElementsByLinkText, #findElementsByName, #findElementsByPartialLinkText, #findElementsByTagName, #findElementsByXpath, #get, #getActiveElement, #getAlertText, #getCapabilities, #getCurrentUrl, #getCurrentWindowHandle, #getElementAttribute, #getElementLocation, #getElementLocationOnceScrolledIntoView, #getElementSize, #getElementTagName, #getElementText, #getElementValue, #getElementValueOfCssProperty, #getPageSource, #getScreenshot, #getTitle, #getVisible, #getWindowHandles, #goBack, #goForward, #isElementDisplayed, #isElementEnabled, #isElementSelected, #mouseDown, #mouseMoveTo, #mouseUp, #refresh, #sendKeysToElement, #sendModifierKeyToActiveElement, #session_id, #setAlertValue, #setElementSelected, #setScriptTimeout, #setVisible, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToWindow, #toggleElement

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.

Returns a new instance of Bridge.



8
9
10
11
12
13
14
15
16
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 8

def initialize(opts = {})
  @launcher = Launcher.new(
    :default_profile => opts[:default_profile],
    :secure_ssl      => opts[:secure_ssl]
  )

  @executor = CommandExecutor.new
  @launcher.launch(@executor.uri)
end

Instance Method Details

#browserObject

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.



18
19
20
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 18

def browser
  :chrome
end

#capabilitiesObject

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
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 26

def capabilities
  @capabilities ||= Remote::Capabilities.chrome
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.



44
45
46
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 44

def deleteCookie(name)
  execute :deleteCookie, :name => name
end

#driver_extensionsObject

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.



22
23
24
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 22

def driver_extensions
  [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.



52
53
54
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 52

def elementEquals(element, other)
  element.ref == other.ref
end

#getAllCookiesObject

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.



40
41
42
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 40

def getAllCookies
  execute :getCookies
end

#quitObject

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.



30
31
32
33
34
35
36
37
38
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 30

def quit
  begin
    super
  rescue IOError
  end

  @executor.close
  @launcher.quit
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.



48
49
50
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 48

def setImplicitWaitTimeout(milliseconds)
  execute :implicitlyWait, :ms => milliseconds
end