Skip to content

Commit c10e3f5

Browse files
committed
Cleaning up docs. No functional changes.
1 parent b9b07f4 commit c10e3f5

File tree

15 files changed

+490
-517
lines changed

15 files changed

+490
-517
lines changed

javascript/node/selenium-webdriver/builder.js

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,44 +47,40 @@ function startSeleniumServer(jar) {
4747
* Creates new {@link webdriver.WebDriver WebDriver} instances. The environment
4848
* variables listed below may be used to override a builder's configuration,
4949
* allowing quick runtime changes.
50-
* <ul>
51-
* <li>{@code SELENIUM_BROWSER}: defines the target browser in the form
50+
*
51+
* - {@code SELENIUM_BROWSER}: defines the target browser in the form
5252
* {@code browser[:version][:platform]}.
5353
*
54-
* <li>{@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder
54+
* - {@code SELENIUM_REMOTE_URL}: defines the remote URL for all builder
5555
* instances. This environment variable should be set to a fully qualified
5656
* URL for a WebDriver server (e.g. http://localhost:4444/wd/hub). This
5757
* option always takes precedence over {@code SELENIUM_SERVER_JAR}.
5858
*
59-
* <li>{@code SELENIUM_SERVER_JAR}: defines the path to the
60-
* <a href="http://selenium-release.storage.googleapis.com/index.html">
61-
* standalone Selenium server</a> jar to use. The server will be started the
62-
* first time a WebDriver instance and be killed when the process exits.
63-
* </ul>
59+
* - {@code SELENIUM_SERVER_JAR}: defines the path to the
60+
* <a href="http://selenium-release.storage.googleapis.com/index.html">
61+
* standalone Selenium server</a> jar to use. The server will be started the
62+
* first time a WebDriver instance and be killed when the process exits.
63+
*
64+
* Suppose you had mytest.js that created WebDriver with
6465
*
65-
* <p>Suppose you had mytest.js that created WebDriver with
66-
* <pre><code>
67-
* var driver = new webdriver.Builder()
68-
* .forBrowser('chrome')
69-
* .build();
70-
* </code></pre>
66+
* var driver = new webdriver.Builder()
67+
* .forBrowser('chrome')
68+
* .build();
7169
*
7270
* This test could be made to use Firefox on the local machine by running with
73-
* {@code SELENIUM_BROWSER=firefox node mytest.js}. Rather than change the
74-
* code to target Google Chrome on a remote machine, you can simply set the
75-
* SELENIUM_BROWSER and SELENIUM_REMOTE_URL environment variables:
76-
* <pre><code>
77-
* SELENIUM_BROWSER=chrome:36:LINUX \
78-
* SELENIUM_REMOTE_URL=http://www.example.com:4444/wd/hub \
79-
* node mytest.js
80-
* </code></pre>
71+
* `SELENIUM_BROWSER=firefox node mytest.js`. Rather than change the code to
72+
* target Google Chrome on a remote machine, you can simply set the
73+
* `SELENIUM_BROWSER` and `SELENIUM_REMOTE_URL` environment variables:
74+
*
75+
* SELENIUM_BROWSER=chrome:36:LINUX \
76+
* SELENIUM_REMOTE_URL=http://www.example.com:4444/wd/hub \
77+
* node mytest.js
78+
*
79+
* You could also use a local copy of the standalone Selenium server:
8180
*
82-
* <p>You could also use a local copy of the standalone Selenium server:
83-
* <pre><code>
84-
* SELENIUM_BROWSER=chrome:36:LINUX \
85-
* SELENIUM_SERVER_JAR=/path/to/selenium-server-standalone.jar \
86-
* node mytest.js
87-
* </code></pre>
81+
* SELENIUM_BROWSER=chrome:36:LINUX \
82+
* SELENIUM_SERVER_JAR=/path/to/selenium-server-standalone.jar \
83+
* node mytest.js
8884
*
8985
* @constructor
9086
*/
@@ -127,8 +123,8 @@ Builder.prototype.disableEnvironmentOverrides = function() {
127123
* specified, the builder direct all new clients to that server. If this method
128124
* is never called, the Builder will attempt to create all clients locally.
129125
*
130-
* <p>As an alternative to this method, you may also set the
131-
* {@code SELENIUM_REMOTE_URL} environment variable.
126+
* As an alternative to this method, you may also set the `SELENIUM_REMOTE_URL`
127+
* environment variable.
132128
*
133129
* @param {string} url The URL of a remote server to use.
134130
* @return {!Builder} A self reference.
@@ -176,9 +172,9 @@ Builder.prototype.getCapabilities = function() {
176172
* Any calls to {@link #withCapabilities} after this function will
177173
* overwrite these settings.
178174
*
179-
* <p>You may also define the target browser using the {@code SELENIUM_BROWSER}
175+
* You may also define the target browser using the {@code SELENIUM_BROWSER}
180176
* environment variable. If set, this environment variable should be of the
181-
* form {@code browser[:[version][:platform]]}.
177+
* form `browser[:[version][:platform]]`.
182178
*
183179
* @param {(string|webdriver.Browser)} name The name of the target browser;
184180
* common defaults are available on the {@link webdriver.Browser} enum.

javascript/node/selenium-webdriver/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ exports.Command = base.require('webdriver.Command');
5252
exports.EventEmitter = base.require('webdriver.EventEmitter');
5353

5454

55+
/** @type {function(new: webdriver.FileDetector)} */
56+
exports.FileDetector = base.require('webdriver.FileDetector');
57+
58+
5559
/** @type {function(new: webdriver.Serializable)} */
5660
exports.Serializable = base.require('webdriver.Serializable');
5761

javascript/node/selenium-webdriver/io/exec.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ var promise = require('..').promise;
2222

2323
/**
2424
* A hash with configuration options for an executed command.
25-
* <ul>
26-
* <li>
27-
* <li>{@code args} - Command line arguments.
28-
* <li>{@code env} - Command environment; will inherit from the current process
29-
* if missing.
30-
* <li>{@code stdio} - IO configuration for the spawned server process. For
31-
* more information, refer to the documentation of
32-
* {@code child_process.spawn}.
33-
* </ul>
25+
*
26+
* - `args` - Command line arguments.
27+
* - `env` - Command environment; will inherit from the current process if
28+
* missing.
29+
* - `stdio` - IO configuration for the spawned server process. For more
30+
* information, refer to the documentation of `child_process.spawn`.
3431
*
3532
* @typedef {{
3633
* args: (!Array.<string>|undefined),

javascript/node/selenium-webdriver/proxy.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414

1515
/**
1616
* @fileoverview Defines functions for configuring a webdriver proxy:
17-
* <pre><code>
18-
* var webdriver = require('selenium-webdriver'),
19-
* proxy = require('selenium-webdriver/proxy');
2017
*
21-
* var driver = new webdriver.Builder()
22-
* .withCapabilities(webdriver.Capabilities.chrome())
23-
* .setProxy(proxy.manual({http: 'host:1234'}))
24-
* .build();
25-
* </code></pre>
18+
* var webdriver = require('selenium-webdriver'),
19+
* proxy = require('selenium-webdriver/proxy');
20+
*
21+
* var driver = new webdriver.Builder()
22+
* .withCapabilities(webdriver.Capabilities.chrome())
23+
* .setProxy(proxy.manual({http: 'host:1234'}))
24+
* .build();
2625
*/
2726

2827
'use strict';
@@ -46,14 +45,13 @@ exports.direct = function() {
4645
/**
4746
* Manually configures the browser proxy. The following options are
4847
* supported:
49-
* <ul>
50-
* <li>{@code ftp}: Proxy host to use for FTP requests
51-
* <li>{@code http}: Proxy host to use for HTTP requests
52-
* <li>{@code https}: Proxy host to use for HTTPS requests
53-
* <li>{@code bypass}: A list of hosts requests should directly connect to,
48+
*
49+
* - `ftp`: Proxy host to use for FTP requests
50+
* - `http`: Proxy host to use for HTTP requests
51+
* - `https`: Proxy host to use for HTTPS requests
52+
* - `bypass`: A list of hosts requests should directly connect to,
5453
* bypassing any other proxies for that request. May be specified as a
5554
* comma separated string, or a list of strings.
56-
* </ul>
5755
*
5856
* Behavior is undefined for FTP, HTTP, and HTTPS requests if the
5957
* corresponding key is omitted from the configuration options.

javascript/node/selenium-webdriver/remote/index.js

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,20 @@ var _base = require('../_base'),
3232

3333
/**
3434
* Configuration options for a DriverService instance.
35-
* <ul>
36-
* <li>
37-
* <li>{@code loopback} - Whether the service should only be accessed on this
38-
* host's loopback address.
39-
* <li>{@code port} - The port to start the server on (must be > 0). If the
40-
* port is provided as a promise, the service will wait for the promise to
41-
* resolve before starting.
42-
* <li>{@code args} - The arguments to pass to the service. If a promise is
43-
* provided, the service will wait for it to resolve before starting.
44-
* <li>{@code path} - The base path on the server for the WebDriver wire
45-
* protocol (e.g. '/wd/hub'). Defaults to '/'.
46-
* <li>{@code env} - The environment variables that should be visible to the
47-
* server process. Defaults to inheriting the current process's
48-
* environment.
49-
* <li>{@code stdio} - IO configuration for the spawned server process. For
50-
* more information, refer to the documentation of
51-
* {@code child_process.spawn}.
52-
* </ul>
35+
*
36+
* - `loopback` - Whether the service should only be accessed on this host's
37+
* loopback address.
38+
* - `port` - The port to start the server on (must be > 0). If the port is
39+
* provided as a promise, the service will wait for the promise to resolve
40+
* before starting.
41+
* - `args` - The arguments to pass to the service. If a promise is provided,
42+
* the service will wait for it to resolve before starting.
43+
* - `path` - The base path on the server for the WebDriver wire protocol
44+
* (e.g. '/wd/hub'). Defaults to '/'.
45+
* - `env` - The environment variables that should be visible to the server
46+
* process. Defaults to inheriting the current process's environment.
47+
* - `stdio` - IO configuration for the spawned server process. For more
48+
* information, refer to the documentation of `child_process.spawn`.
5349
*
5450
* @typedef {{
5551
* port: (number|!webdriver.promise.Promise.<number>),
@@ -65,10 +61,10 @@ var ServiceOptions;
6561
/**
6662
* Manages the life and death of a native executable WebDriver server.
6763
*
68-
* <p>It is expected that the driver server implements the
69-
* <a href="http://code.google.com/p/selenium/wiki/JsonWireProtocol">WebDriver
70-
* Wire Protocol</a>. Furthermore, the managed server should support multiple
71-
* concurrent sessions, so that this class may be reused for multiple clients.
64+
* It is expected that the driver server implements the
65+
* [WebDriver wire protocol](http://code.google.com/p/selenium/wiki/JsonWireProtocol).
66+
* Furthermore, the managed server should support multiple concurrent sessions,
67+
* so that this class may be reused for multiple clients.
7268
*
7369
* @param {string} executable Path to the executable to run.
7470
* @param {!ServiceOptions} options Configuration options for the service.
@@ -280,21 +276,18 @@ util.inherits(SeleniumServer, DriverService);
280276

281277
/**
282278
* Options for the Selenium server:
283-
* <ul>
284-
* <li>{@code port} - The port to start the server on (must be > 0). If the
285-
* port is provided as a promise, the service will wait for the promise to
286-
* resolve before starting.
287-
* <li>{@code args} - The arguments to pass to the service. If a promise is
288-
* provided, the service will wait for it to resolve before starting.
289-
* <li>{@code jvmArgs} - The arguments to pass to the JVM. If a promise is
290-
* provided, the service will wait for it to resolve before starting.
291-
* <li>{@code env} - The environment variables that should be visible to the
292-
* server process. Defaults to inheriting the current process's
293-
* environment.
294-
* <li>{@code stdio} - IO configuration for the spawned server process. For
295-
* more information, refer to the documentation of
296-
* {@code child_process.spawn}.
297-
* </ul>
279+
*
280+
* - `port` - The port to start the server on (must be > 0). If the port is
281+
* provided as a promise, the service will wait for the promise to resolve
282+
* before starting.
283+
* - `args` - The arguments to pass to the service. If a promise is provided,
284+
* the service will wait for it to resolve before starting.
285+
* - `jvmArgs` - The arguments to pass to the JVM. If a promise is provided,
286+
* the service will wait for it to resolve before starting.
287+
* - `env` - The environment variables that should be visible to the server
288+
* process. Defaults to inheriting the current process's environment.
289+
* - `stdio` - IO configuration for the spawned server process. For more
290+
* information, refer to the documentation of `child_process.spawn`.
298291
*
299292
* @typedef {{
300293
* port: (number|!webdriver.promise.Promise.<number>),
@@ -311,12 +304,25 @@ SeleniumServer.Options;
311304

312305

313306
/**
307+
* A {@link webdriver.FileDetector} that may be used when running
308+
* against a remote
309+
* [Selenium server](http://selenium-release.storage.googleapis.com/index.html).
310+
*
311+
* When a file path on the local machine running this script is entered with
312+
* {@link webdriver.WebElement#sendKeys WebElement#sendKeys}, this file detector
313+
* will transfer the specified file to the Selenium server's host; the sendKeys
314+
* command will be updated to use the transfered file's path.
315+
*
316+
* __Note:__ This class depends on a non-standard command supported on the
317+
* Java Selenium server. The file detector will fail if used with a server that
318+
* only supports standard WebDriver commands (such as the ChromeDriver).
319+
*
314320
* @constructor
315321
* @extends {webdriver.FileDetector}
316322
* @final
317323
*/
318324
var FileDetector = function() {};
319-
util.inherits(_base.require('webdriver.FileDetector'), FileDetector);
325+
util.inherits(webdriver.FileDetector, FileDetector);
320326

321327

322328
/** @override */

javascript/node/selenium-webdriver/testing/assert.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@
1616
* @fileoverview Defines a library that simplifies writing assertions against
1717
* promised values.
1818
*
19-
* <blockquote>
20-
* <hr>
21-
* <b>NOTE:</b> This module is considered experimental and is subject to
22-
* change, or removal, at any time!
23-
* <hr>
24-
* </blockquote>
19+
* > <hr>
20+
* > __NOTE:__ This module is considered experimental and is subject to
21+
* > change, or removal, at any time!
22+
* > <hr>
2523
*
2624
* Sample usage:
27-
* <pre><code>
28-
* var driver = new webdriver.Builder().build();
29-
* driver.get('http://www.google.com');
3025
*
31-
* assert(driver.getTitle()).equalTo('Google');
32-
* </code></pre>
26+
* var driver = new webdriver.Builder().build();
27+
* driver.get('http://www.google.com');
28+
*
29+
* assert(driver.getTitle()).equalTo('Google');
3330
*/
3431

3532
var base = require('../_base'),

0 commit comments

Comments
 (0)