API Docs for: 0.0.9
Show:

Dalek.Remote Class

Module: Remote

Mimics a real browser that runs in a remote dalek instance

Methods

_afterRemoteBrowserLaunched

(
  • deferred
  • response
)
private chainable

Listens on the response of the initial browser launch call and collects the response data, fires the _handshakeFinished call after the response ended

Parameters:

  • deferred Object

    Promise

  • response Object

    Browser launch response object

_handshakeFinished

(
  • deferred
  • data
)
private chainable

Parses the response data of the initial browser handshake, sets the longName, desiredCapabilities & driverDefaults, emits the browser data (can be used by reporters & drivers)

Parameters:

  • deferred Object

    Promise

  • data Array

    Remote browser data (longName, desiredCapabilities, driverDefaults)

_loadConfigs

(
  • configuration
  • config
)
private chainable

Sets the host & port of the remote instance, extracts the remote browser to call, generates the launch & kill objects for this session

Parameters:

  • configuration Object

    Browser session configuration

  • config Object

    Dalek configuration data

_replaceUrlPlaceholder

(
  • url
)
String private

Replaces {{host}}, {{port}} & {{browser}} placeholders in the given url with data from this.host, this.port & this.browserAlias

Parameters:

  • url String

    Url with placeholder

Returns:

String:

Url with replaced placeholders

kill

() Object

Kills the remote browser

Returns:

Object:

Promise

launch

(
  • configuration
  • events
  • config
)
Object

Stores & validates the incoming browser config

Parameters:

  • configuration Object

    Browser configuration

  • events EventEmitter2

    EventEmitter (Reporter Emitter instance)

  • config Dalek.Internal.Config

    Dalek configuration class

Returns:

Object:

Browser promise

setBrowser

(
  • browser
)
chainable

Injects the browser name

Parameters:

  • browser String

    Browser to launch

Properties

browser

String

Internal config name of the browser to start remotly

Default: '

browserAlias

String

Remote browser alias to start a browser (browser.name or browser.actAs or user input browser alias)

Default: '

defaultKillUrl

String

Url (with placeholders) to kill browsers on the remote instance

Default: http://{{host}}:{{port}}/dalek/kill

defaultLaunchUrl

String

Url (with placeholders) to launch browsers on the remote instance

Default: http://{{host}}:{{port}}/dalek/launch/{{browser}}

driverDefaults

Object

Driver defaults

host

String

Remote host

Default: ''

killUrl

String

Url to kill a specific remote browser session

Default: ''

launchUrl

String

Url to start a specific remote browser session

Default: ''

path

String

Remote webdriver path

Default: ''

port

Integer

Remote port

Default: 9020