Class webdriver.AbstractBuilder
Defined in: abstractbuilder.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Creates new {@code webdriver.WebDriver} clients.
|
Field Attributes | Field Name and Description |
---|---|
Builds a new webdriver.WebDriver instance using this builder's
current configuration.
|
|
<static> |
webdriver.AbstractBuilder.DEFAULT_SERVER_URL
The default URL of the WebDriver server to use if
webdriver.AbstractBuilder.SERVER_URL_ENV is not set.
|
<static> |
webdriver.AbstractBuilder.SERVER_URL_ENV
Environment variable that defines the URL of the WebDriver server that
should be used for all new WebDriver clients.
|
Method Attributes | Method Name and Description |
---|---|
usingServer(url)
Configures which WebDriver server should be used for new sessions.
|
|
withCapabilities(capabilities)
Sets the desired capabilities when requesting a new session.
|
Class Detail
webdriver.AbstractBuilder()
Creates new {@code webdriver.WebDriver} clients. Upon instantiation, each
Builder will configure itself based on the following environment variables:
- {@code webdriver.AbstractBuilder.SERVER_URL_ENV}
- Defines the remote WebDriver server that should be used for command command execution; may be overridden using {@code webdriver.AbstractBuilder.prototype.usingServer}.
Field Detail
{!webdriver.WebDriver}
build
Builds a new webdriver.WebDriver instance using this builder's
current configuration.
<static>
webdriver.AbstractBuilder.DEFAULT_SERVER_URL
The default URL of the WebDriver server to use if
webdriver.AbstractBuilder.SERVER_URL_ENV is not set.
<static>
webdriver.AbstractBuilder.SERVER_URL_ENV
Environment variable that defines the URL of the WebDriver server that
should be used for all new WebDriver clients. This setting may be overridden
using {@code #usingServer(url)}.
Method Detail
{!webdriver.Capabilities}
getCapabilities()
- Returns:
- {!webdriver.Capabilities} The current desired capabilities for this builder.
{string}
getServerUrl()
- Returns:
- {string} The URL of the WebDriver server this instance is configured to use.
{!webdriver.AbstractBuilder}
usingServer(url)
Configures which WebDriver server should be used for new sessions. Overrides
the value loaded from the webdriver.AbstractBuilder.SERVER_URL_ENV
upon creation of this instance.
- Parameters:
- {string} url
- URL of the server to use.
- Returns:
- {!webdriver.AbstractBuilder} This Builder instance for chain calling.
{!webdriver.AbstractBuilder}
withCapabilities(capabilities)
Sets the desired capabilities when requesting a new session. This will
overwrite any previously set desired capabilities.
- Parameters:
- {!(Object|webdriver.Capabilities)} capabilities
- The desired capabilities for a new session.
- Returns:
- {!webdriver.AbstractBuilder} This Builder instance for chain calling.