digdug/SeleniumTunnel

Inheritance

  1. digdug/SeleniumTunnel
  2. module:digdug/Tunnel
  3. Object

new (require("digdug/SeleniumTunnel"))()

A Selenium tunnel. This tunnel downloads the Selenium-standalone server and any necessary WebDriver executables, and handles starting and stopping Selenium.

The primary configuration option is drivers, which determines which browsers the Selenium tunnel will support.

Note that Java must be installed and in the system path to use this tunnel.

All Properties

Property Defined by
architecture: string

The architecture the tunnel will run against.

digdug/Tunnel
auth: string

An HTTP authorization string to use when initiating connections to the tunnel.

digdug/Tunnel
baseUrl: string

The base address where Selenium artifacts may be found.

digdug/SeleniumTunnel
clientUrl: string
(readonly)

The URL that a WebDriver client should used to interact with this service.

digdug/Tunnel
directory: string

The directory where the tunnel software will be extracted.

digdug/Tunnel
drivers: Array.<(string|Object)>

The desired Selenium drivers to install.

digdug/SeleniumTunnel
executable: string

The executable to spawn in order to create a tunnel.

digdug/Tunnel
(readonly)

A map of additional capabilities that need to be sent to the provider when a new session is being created.

digdug/Tunnel
hostname: string

The host on which a WebDriver client can access the service provided by the tunnel.

digdug/Tunnel
isDownloaded: string
(readonly)

Whether or not the tunnel software has already been downloaded.

digdug/Tunnel
isRunning: boolean
(readonly)

Whether or not the tunnel is currently running.

digdug/Tunnel
isStarting: boolean
(readonly)

Whether or not the tunnel is currently starting up.

digdug/Tunnel
isStopping: boolean
(readonly)

Whether or not the tunnel is currently stopping.

digdug/Tunnel
pathname: string

The path that a WebDriver client should use to access the service provided by the tunnel.

digdug/Tunnel
platform: string

The operating system the tunnel will run on.

digdug/Tunnel
port: number

The local port where the WebDriver server should be exposed by the tunnel.

digdug/Tunnel
protocol: string

The protocol (e.g., 'http') that a WebDriver client should use to access the service provided by the tunnel.

digdug/Tunnel
proxy: string

The URL of a proxy server for the tunnel to go through.

digdug/Tunnel
seleniumArgs: Array.<string>

Additional arguments to send to the Selenium server at startup

digdug/SeleniumTunnel
seleniumTimeout: number

Timeout in milliseconds for communicating with the Selenium server

digdug/SeleniumTunnel
tunnelId: string

A unique identifier for the newly created tunnel.

digdug/Tunnel
url: string

The URL where the tunnel software can be downloaded.

digdug/Tunnel
verbose: boolean

Whether or not to tell the tunnel to provide verbose logging output.

digdug/Tunnel
version: string

The desired version of selenium to install.

digdug/SeleniumTunnel

All Methods

Method Defined by
_makeArgs(): Array.<string>
(protected)

Creates the list of command-line arguments to be passed to the spawned tunnel.

digdug/Tunnel
_makeChild(): Object
(protected)

Creates a newly spawned child process for the tunnel software.

digdug/Tunnel
_makeOptions(): Object
(protected)

Creates the set of options to use when spawning the tunnel process.

digdug/Tunnel
_normalizeEnvironment(environment)
(protected)

Normalizes a specific Tunnel environment descriptor to a general form.

digdug/Tunnel

Called with the response after a file download has completed

digdug/Tunnel
_start(): Object
(protected)

This method provides the implementation that actually starts the tunnel and any other logic for emitting events on the Tunnel based on data passed by the tunnel software.

digdug/Tunnel
_stop(): Promise.<void>
(protected)

This method provides the implementation that actually stops the tunnel.

digdug/Tunnel
download(forceDownload: boolean): Promise.<void>

Downloads and extracts the tunnel software if it is not already downloaded.

digdug/Tunnel

Get a list of environments available on the service.

digdug/Tunnel
sendJobState(jobId: string, data: JobState): Promise.<void>

Sends information about a job to the tunnel provider.

digdug/Tunnel
start(): Promise.<void>

Starts the tunnel, automatically downloading dependencies if necessary.

digdug/Tunnel
stop(): Promise.<integer>

Stops the tunnel.

digdug/Tunnel

All Events

Event Defined by

Part of the tunnel has been downloaded from the server.

digdug/Tunnel

Information about the status of the tunnel setup process that is suitable for presentation to end-users.

digdug/Tunnel

A chunk of raw string data output by the tunnel software to stderr.

digdug/Tunnel

A chunk of raw string data output by the tunnel software to stdout.

digdug/Tunnel

Properties

baseUrl: string

The base address where Selenium artifacts may be found.

Defaults to

'https://selenium-release.storage.googleapis.com'

drivers: Array.<(string|Object)>

The desired Selenium drivers to install. Each entry may be a string or an object. Strings must be the names of existing drivers in SeleniumTunnel. An object with a 'name' property is a configuration object -- the name must be the name of an existing driver in SeleniumTunnel, and the remaining properties will be used to configure that driver. An object without a 'name' property is a driver definition. It must contain three properties:

  • executable - the name of the driver executable
  • url - the URL where the driver can be downloaded from
  • seleniumProperty - the name of the Java property used to tell Selenium where the driver is

Defaults to

[ 'chrome' ]

Example

[
     'chrome',
     {
         name: 'firefox',
         version: '0.8.0'
     },
     {
         url: 'https://github.com/operasoftware/operachromiumdriver/releases/.../operadriver_mac64.zip',
         executable: 'operadriver',
         seleniumProperty: 'webdriver.opera.driver'
     }
	]

seleniumArgs: Array.<string>

Additional arguments to send to the Selenium server at startup

seleniumTimeout: number

Timeout in milliseconds for communicating with the Selenium server

Defaults to

5000

version: string

The desired version of selenium to install.

Defaults to

'3.0.1'