Class: Selenium::WebDriver::Chrome::Bridge Private
- Inherits:
-
Remote::Bridge
- Object
- Remote::Bridge
- Selenium::WebDriver::Chrome::Bridge
- 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
Instance Attribute Summary
Attributes inherited from Remote::Bridge
Instance Method Summary collapse
- #browser ⇒ Object private
- #capabilities ⇒ Object private
- #driver_extensions ⇒ Object private
-
#initialize(opts = {}) ⇒ Bridge
constructor
private
A new instance of Bridge.
- #quit ⇒ Object private
Methods inherited from Remote::Bridge
#acceptAlert, #addCookie, #clearElement, #click, #clickElement, #close, command, #contextClick, #create_session, #deleteAllCookies, #deleteCookie, #dismissAlert, #doubleClick, #dragElement, #elementEquals, #executeAsyncScript, #executeScript, #findElementByClassName, #findElementByCssSelector, #findElementById, #findElementByLinkText, #findElementByName, #findElementByPartialLinkText, #findElementByTagName, #findElementByXpath, #findElementsByClassName, #findElementsByCssSelector, #findElementsById, #findElementsByLinkText, #findElementsByName, #findElementsByPartialLinkText, #findElementsByTagName, #findElementsByXpath, #get, #getActiveElement, #getAlertText, #getAllCookies, #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, #setImplicitWaitTimeout, #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 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 8 def initialize(opts = {}) # TODO: pass options to Chrome::Service http_client = opts.delete(:http_client) unless opts.empty? raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}" end @service = Service.default_service @service.start remote_opts = { :url => @service.uri, :desired_capabilities => :chrome } remote_opts.merge!(:http_client => http_client) if http_client super(remote_opts) end |
Instance Method Details
#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.
29 30 31 |
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 29 def browser :chrome end |
#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.
37 38 39 |
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 37 def capabilities @capabilities ||= Remote::Capabilities.chrome 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.
33 34 35 |
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 33 def driver_extensions [] 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.
41 42 43 44 45 |
# File 'lib/selenium/webdriver/chrome/bridge.rb', line 41 def quit super ensure @service.stop end |