Class: Selenium::WebDriver::Firefox::W3CBridge Private

Inherits:
Remote::W3CBridge show all
Defined in:
lib/selenium/webdriver/firefox/w3c_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::W3CBridge

Remote::W3CBridge::COMMANDS, Remote::W3CBridge::QUIT_ERRORS

Instance Attribute Summary

Attributes inherited from Remote::W3CBridge

#capabilities, #context, #file_detector, #http

Instance Method Summary collapse

Methods inherited from Remote::W3CBridge

#acceptAlert, #addCookie, #clearElement, #clearLocalStorage, #clearSessionStorage, #click, #clickElement, #close, command, #contextClick, #create_session, #deleteAllCookies, #deleteCookie, #dismissAlert, #doubleClick, #dragElement, #executeAsyncScript, #executeScript, #find_element_by, #find_elements_by, #fullscreenWindow, #get, #getActiveElement, #getAlertText, #getAllCookies, #getCookie, #getCurrentUrl, #getCurrentWindowHandle, #getElementAttribute, #getElementLocation, #getElementLocationOnceScrolledIntoView, #getElementSize, #getElementTagName, #getElementText, #getElementValue, #getElementValueOfCssProperty, #getLocalStorageItem, #getLocalStorageKeys, #getLocalStorageSize, #getLocation, #getNetworkConnection, #getPageSource, #getScreenOrientation, #getScreenshot, #getSessionStorageItem, #getSessionStorageKeys, #getSessionStorageSize, #getTitle, #getWindowHandles, #getWindowPosition, #getWindowSize, #goBack, #goForward, #isElementDisplayed, #isElementEnabled, #isElementSelected, #maximizeWindow, #mouseDown, #mouseMoveTo, #mouseUp, #refresh, #removeLocalStorageItem, #removeSessionStorageItem, #sendKeysToActiveElement, #sendKeysToElement, #session_id, #setAlertValue, #setImplicitWaitTimeout, #setLocalStorageItem, #setLocation, #setNetworkConnection, #setScreenOrientation, #setScriptTimeout, #setSessionStorageItem, #setTimeout, #setWindowPosition, #setWindowSize, #status, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToParentFrame, #switchToWindow, #touchDoubleTap, #touchDown, #touchElementFlick, #touchFlick, #touchLongPress, #touchMove, #touchScroll, #touchSingleTap, #touchUp

Methods included from BridgeHelper

#element_id_from, #parse_cookie_string, #unwrap_script_result

Constructor Details

#initialize(opts = {}) ⇒ W3CBridge

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 W3CBridge.



27
28
29
30
31
32
33
34
35
36
# File 'lib/selenium/webdriver/firefox/w3c_bridge.rb', line 27

def initialize(opts = {})
  caps = opts[:desired_capabilities] ||= Remote::W3CCapabilities.firefox
  Binary.path = caps[:firefox_binary] if caps[:firefox_binary]

  @service = Service.default_service(*extract_service_args(opts))
  @service.start
  opts[:url] = @service.uri

  super
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.



38
39
40
# File 'lib/selenium/webdriver/firefox/w3c_bridge.rb', line 38

def browser
  :firefox
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.



42
43
44
45
46
47
48
# File 'lib/selenium/webdriver/firefox/w3c_bridge.rb', line 42

def driver_extensions
  [
    DriverExtensions::TakesScreenshot,
    DriverExtensions::HasInputDevices,
    DriverExtensions::HasWebStorage
  ]
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.



50
51
52
53
54
# File 'lib/selenium/webdriver/firefox/w3c_bridge.rb', line 50

def quit
  super
ensure
  @service.stop if @service
end