瀏覽代碼

Clean up and reorganize initialization documentation

Daniel Gempesaw 11 年之前
父節點
當前提交
6dbcff2e36
共有 1 個文件被更改,包括 21 次插入14 次删除
  1. 21 14
      lib/Selenium/Remote/Driver.pm

+ 21 - 14
lib/Selenium/Remote/Driver.pm

@@ -112,21 +112,20 @@ available here.
 
  Description:
     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)
-    desired_capabilities - HASH - Following options are accepted:
+    Desired capabilities - HASH - Following options are accepted:
       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
         'platform'             - <string>   - desired platform: {WINDOWS|XP|VISTA|MAC|LINUX|UNIX|ANY}
         'javascript'           - <boolean>  - whether javascript should be supported
         '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.
-        '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
-        '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:
             'proxyType' - <string> - REQUIRED, Possible values are:
                 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
             '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:
     Remote Driver object