|
@@ -112,21 +112,20 @@ available here.
|
|
|
|
|
|
|
|
Description:
|
|
Description:
|
|
|
Constructor for Driver. It'll instantiate the object if it can communicate
|
|
Constructor for Driver. It'll instantiate the object if it can communicate
|
|
|
- with the Selenium RC server.
|
|
|
|
|
|
|
+ with the Selenium Webdriver server.
|
|
|
|
|
|
|
|
Input: (all optional)
|
|
Input: (all optional)
|
|
|
- desired_capabilities - HASH - Following options are accepted:
|
|
|
|
|
|
|
+ Desired capabilities - HASH - Following options are accepted:
|
|
|
Optional:
|
|
Optional:
|
|
|
- 'remote_server_addr' - <string> - IP or FQDN of the RC server machine
|
|
|
|
|
- 'browser_name' - <string> - desired browser string: {iphone|firefox|internet explorer|htmlunit|iphone|chrome}
|
|
|
|
|
|
|
+ 'remote_server_addr' - <string> - IP or FQDN of the Webdriver server machine
|
|
|
|
|
+ 'port' - <string> - Port on which the Webdriver server is listening
|
|
|
|
|
+ 'browser_name' - <string> - desired browser string: {phantomjs|firefox|internet explorer|htmlunit|iphone|chrome}
|
|
|
'version' - <string> - desired browser version number
|
|
'version' - <string> - desired browser version number
|
|
|
'platform' - <string> - desired platform: {WINDOWS|XP|VISTA|MAC|LINUX|UNIX|ANY}
|
|
'platform' - <string> - desired platform: {WINDOWS|XP|VISTA|MAC|LINUX|UNIX|ANY}
|
|
|
'javascript' - <boolean> - whether javascript should be supported
|
|
'javascript' - <boolean> - whether javascript should be supported
|
|
|
'accept_ssl_certs' - <boolean> - whether SSL certs should be accepted, default is true.
|
|
'accept_ssl_certs' - <boolean> - whether SSL certs should be accepted, default is true.
|
|
|
'auto_close' - <boolean> - whether driver should end session on remote server on close.
|
|
'auto_close' - <boolean> - whether driver should end session on remote server on close.
|
|
|
- 'default_finder' - <string> - choose default finder used for find_element* {class|class_name|css|id|link|link_text|name|partial_link_text|tag_name|xpath}
|
|
|
|
|
'extra_capabilities' - HASH of extra capabilities
|
|
'extra_capabilities' - HASH of extra capabilities
|
|
|
- 'webelement_class' - <string> - sub-class of Selenium::Remote::WebElement if you wish to use an alternate WebElement class.
|
|
|
|
|
'proxy' - HASH - Proxy configuration with the following keys:
|
|
'proxy' - HASH - Proxy configuration with the following keys:
|
|
|
'proxyType' - <string> - REQUIRED, Possible values are:
|
|
'proxyType' - <string> - REQUIRED, Possible values are:
|
|
|
direct - A direct connection - no proxy in use,
|
|
direct - A direct connection - no proxy in use,
|
|
@@ -139,15 +138,23 @@ available here.
|
|
|
'httpProxy' - <string> - OPTIONAL, ignored if proxyType is not 'manual'. Expected format: hostname.com:1234
|
|
'httpProxy' - <string> - OPTIONAL, ignored if proxyType is not 'manual'. Expected format: hostname.com:1234
|
|
|
'sslProxy' - <string> - OPTIONAL, ignored if proxyType is not 'manual'. Expected format: hostname.com:1234
|
|
'sslProxy' - <string> - OPTIONAL, ignored if proxyType is not 'manual'. Expected format: hostname.com:1234
|
|
|
|
|
|
|
|
|
|
+ You can also specify some options in the constructor hash that are
|
|
|
|
|
+ not part of the browser-related desired capabilities:
|
|
|
|
|
+
|
|
|
|
|
+ 'default_finder' - <string> - choose default finder used for find_element* {class|class_name|css|id|link|link_text|name|partial_link_text|tag_name|xpath}
|
|
|
|
|
+ 'webelement_class' - <string> - sub-class of Selenium::Remote::WebElement if you wish to use an alternate WebElement class.
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ If no values are provided, then these defaults will be assumed:
|
|
|
|
|
+ 'remote_server_addr' => 'localhost'
|
|
|
|
|
+ 'port' => '4444'
|
|
|
|
|
+ 'browser_name' => 'firefox'
|
|
|
|
|
+ 'version' => ''
|
|
|
|
|
+ 'platform' => 'ANY'
|
|
|
|
|
+ 'javascript' => 1
|
|
|
|
|
+ 'auto_close' => 1
|
|
|
|
|
+ 'default_finder' => 'xpath'
|
|
|
|
|
|
|
|
- If no values are provided, then these defaults will be assumed:
|
|
|
|
|
- 'remote_server_addr' => 'localhost'
|
|
|
|
|
- 'port' => '4444'
|
|
|
|
|
- 'browser_name' => 'firefox'
|
|
|
|
|
- 'version' => ''
|
|
|
|
|
- 'platform' => 'ANY'
|
|
|
|
|
- 'javascript' => 1
|
|
|
|
|
- 'auto_close' => 1
|
|
|
|
|
|
|
|
|
|
Output:
|
|
Output:
|
|
|
Remote Driver object
|
|
Remote Driver object
|