Class: Selenium::WebDriver::IE::Bridge Private

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

HOST =

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.

Platform.localhost
DEFAULT_PORT =

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.

5555
DEFAULT_TIMEOUT =

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.

30

Constants inherited from Remote::Bridge

Remote::Bridge::QUIT_ERRORS

Instance Attribute Summary

Attributes inherited from Remote::Bridge

#capabilities, #context, #file_detector, #http

Instance Method Summary collapse

Methods inherited from Remote::Bridge

#acceptAlert, #addCookie, #clearElement, #clearLocalStorage, #clearSessionStorage, #click, #clickElement, #close, command, #contextClick, #create_session, #deleteAllCookies, #deleteCookie, #dismissAlert, #doubleClick, #dragElement, #elementEquals, #executeAsyncScript, #executeScript, #find_element_by, #find_elements_by, #get, #getActiveElement, #getAlert, #getAlertText, #getAllCookies, #getAvailableLogTypes, #getCapabilities, #getCurrentUrl, #getCurrentWindowHandle, #getElementAttribute, #getElementLocation, #getElementLocationOnceScrolledIntoView, #getElementSize, #getElementTagName, #getElementText, #getElementValue, #getElementValueOfCssProperty, #getLocalStorageItem, #getLocalStorageKeys, #getLocalStorageSize, #getLocation, #getLog, #getNetworkConnection, #getPageSource, #getScreenOrientation, #getScreenshot, #getSessionStorageItem, #getSessionStorageKeys, #getSessionStorageSize, #getTitle, #getVisible, #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, #setVisible, #setWindowPosition, #setWindowSize, #status, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToParentFrame, #switchToWindow, #touchDoubleTap, #touchDown, #touchElementFlick, #touchFlick, #touchLongPress, #touchMove, #touchScroll, #touchSingleTap, #touchUp, #upload

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.



34
35
36
37
38
39
40
41
42
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
# File 'lib/selenium/webdriver/ie/bridge.rb', line 34

def initialize(opts = {})
  caps           = opts.delete(:desired_capabilities) { Remote::Capabilities.internet_explorer }
  timeout        = opts.delete(:timeout) { DEFAULT_TIMEOUT }
  port           = opts.delete(:port) { PortProber.above(DEFAULT_PORT) }
  http_client    = opts.delete(:http_client)
  ignore_mode    = opts.delete(:introduce_flakiness_by_ignoring_security_domains)
  native_events  = opts.delete(:native_events) != false
  implementation = opts.delete(:implementation)

  @server = Server.get(:implementation => implementation)

  @server.log_level = opts.delete(:log_level) if opts[:log_level]
  @server.log_file  = opts.delete(:log_file) if opts[:log_file]

  unless opts.empty?
    raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}"
  end

  @port = @server.start Integer(port), timeout

  if ignore_mode
    caps['ignoreProtectedModeSettings'] = true
  end

  caps['nativeEvents'] = native_events

  remote_opts = {
    :url => @server.uri,
    :desired_capabilities => caps
  }

  remote_opts[:http_client] = http_client if http_client

  super(remote_opts)
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.



70
71
72
# File 'lib/selenium/webdriver/ie/bridge.rb', line 70

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



74
75
76
# File 'lib/selenium/webdriver/ie/bridge.rb', line 74

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



78
79
80
81
82
83
# File 'lib/selenium/webdriver/ie/bridge.rb', line 78

def quit
  super
  nil
ensure
  @server.stop
end