API Docs for: 0.0.9
Show:

Dalek.Driver Class

Module: DalekJS

Generates & starts drivers & browsers the tests will be run in

Methods

_onDriverReady

(
  • browser
  • driverName
  • callback
  • driverInstance
)
private chainable

Generates a testsuite instance, emits the browser running event & starts a new async() sesries execution Will be called when the driver is ready

Parameters:

  • browser String

    Name of the requested browser

  • driverName String

    Name of the requested driver

  • callback Function

    Asyncs next() callback function

  • driverInstance Object

    Instance of the requested driver

_onTestsuiteComplete

(
  • callback
  • driverName
  • browser
)
private chainable

Emits a 'tests complete' event & calls async's next() callback

Parameters:

  • callback Function

    Async's next() callback function

  • driverName String

    Name of the requested driver

  • browser String

    Name of the requested browser

coupleReporterEvents

(
  • driverName
  • browser
)
chainable

Couple driver & session status events for the reporter

Parameters:

  • driverName String

    Name of the requested driver

  • browser String

    Name of the requested browser

createTestsuiteInstance

(
  • driverInstance
  • file
)
Function

Creates a testsuite runner function

Parameters:

  • driverInstance Object

    Instance of the requested driver

  • file String

    Filename of the testsuite

Returns:

Function:

testsuiteRunner Runner function from the testsuite

getDefaultBrowserConfiguration

(
  • browser
  • browsers
)
Object

Loads the default browser driver

Parameters:

  • browser String

    Name of the requested browser driver

  • browsers Object

    Configuration options for the requested browser

Returns:

Object:

browserConfiguration Browser driver isntance and configuration meta data

getDrivers

() Array

Returns a list with browser driver instances

Returns:

Array:

verifiedDrivers

getTestsuiteInstances

(
  • driverInstance
)
Array

Returns a list of testsuite runner functions

Parameters:

  • driverInstance Object

    Instance of the requested driver

Returns:

Array:

testsuiteRunners List of testsuites that should be run

getUserBrowserConfiguration

(
  • browser
  • browsers
)
Object

Loads a user configured browser driver

Parameters:

  • browser String

    Name of the requested browser driver

  • browsers Object

    Configuration options for the requested browser

Returns:

Object:

browserConfiguration Browser driver isntance and configuration meta data

getVerifiedBrowser

(
  • driver
)
Array

Returns a list with browser driver instances

Parameters:

  • driver String

    Name of the requested driver

Returns:

Array:

verifiedDrivers Array of dribver 'run' functions

getVerifiedDriver

(
  • driverModule
  • driver
  • browser
)
Function

Returns a scoped version of the driver run function

Parameters:

  • driverModule Object

    Instance of the used driver

  • driver String

    Name of ther used driver

  • browser String

    Name of the used browser

Returns:

Function:

run Function that kicks off execution of a testsuite chain in a browser

isDriver

(
  • driver
)
Bool

Checks if the requested driver is available

Parameters:

  • driver String

    Name of the requested driver

Returns:

Bool:

isDriver Driver is availavle

loadBrowserConfiguration

(
  • browser
  • browsers
)
Object

Loads a browser driver

Parameters:

  • browser String

    Name of the requested browser driver

  • browsers Object

    Configuration options for the requested browser

Returns:

Object:

browserConfiguration Browser driver isntance and configuration meta data

loadDriver

(
  • driver
)
Object

Loads the requested driver Emits an event to the reporter

Parameters:

  • driver String

    Name of the requested driver

Returns:

Object:

driverModule Instance of the driver module

run

(
  • driverName
  • driverModule
  • browser
  • callback
)
chainable

Driver runner function. Registers event handlers for this run, loads browser & driver configuration & instances, emits the 'driver ready' event for the browser/driver combination

Parameters:

  • driverName String

    Name of the requested driver

  • driverModule Object

    Instance of the used driver module

  • browser String

    Name of the requested browser

  • callback Function

    Asyncs next() callback function