Class: Selenium::WebDriver::IE::Bridge Private
- Inherits:
-
Remote::Bridge
- Object
- Remote::Bridge
- Selenium::WebDriver::IE::Bridge
- 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
Instance Attribute Summary
Attributes inherited from Remote::Bridge
#capabilities, #context, #file_detector, #http
Instance Method Summary collapse
- #browser ⇒ 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, #find_element_by, #find_elements_by, #get, #getActiveElement, #getAlert, #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, #sendKeysToActiveElement, #sendKeysToElement, #sendModifierKeyToActiveElement, #session_id, #setAlertValue, #setElementSelected, #setImplicitWaitTimeout, #setScriptTimeout, #setVisible, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToWindow, #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.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/selenium/webdriver/ie/bridge.rb', line 15 def initialize(opts = {}) timeout = opts.delete(:timeout) { DEFAULT_TIMEOUT } port = opts.delete(:port) { DEFAULT_PORT } http_client = opts.delete(:http_client) unless opts.empty? raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}" end @server = Server.new @port = @server.start Integer(port) host = Platform.localhost unless SocketPoller.new(host, @port, timeout).connected? raise Error::WebDriverError, "unable to connect to IE server within #{timeout} seconds" end remote_opts = { :url => "http://#{host}:#{@port}", :desired_capabilities => :internet_explorer } 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.
42 43 44 |
# File 'lib/selenium/webdriver/ie/bridge.rb', line 42 def browser :internet_explorer 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.
46 47 48 |
# File 'lib/selenium/webdriver/ie/bridge.rb', line 46 def driver_extensions [DriverExtensions::TakesScreenshot, DriverExtensions::HasInputDevices] 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.
50 51 52 53 54 55 |
# File 'lib/selenium/webdriver/ie/bridge.rb', line 50 def quit super @server.stop nil end |