API Docs for: 0.2.7
Show:

Utils Class

Defined in: lib/utils.js:12
Module: Utils
Parent Module: WebDriver

Utils for WebDriver tools

Constructor

Utils

(
  • driver
)

Defined in lib/utils.js:12

Parameters:

Methods

_logMethodCall

(
  • event
)
private

Defined in lib/utils.js:29

Logs a method call by an event

Parameters:

_requestJSON

(
  • method
  • path
  • [body]
)
private

Defined in lib/utils.js:42

Performs a context dependent JSON request for the current session. The result is parsed for errors.

Parameters:

Returns:

:

loadFileContent

(
  • path
)
private

Defined in lib/utils.js:178

Loads contents of a file

Parameters:

  • path String

    Path to file to load

map

(
  • list
  • fn
)

Defined in lib/utils.js:105

Maps values to some other values synchronously and asynchronously

Parameters:

  • list Array

    List of data

  • fn Function

    Function to be called on each entry

resolve

(
  • value
)

Defined in lib/utils.js:164

Resolves a value according to run-mode

Parameters:

  • value

    Value to resolve

sleep

(
  • delay
)

Defined in lib/utils.js:146

Sleep for a set time

Parameters:

  • delay Int

    Number of ms to wait

when

(
  • value
  • fn
)

Defined in lib/utils.js:135

Evaluates the value according to the execution mode the driver is in

Parameters:

  • value

    Value that needs to be evaluated. This could possibly be the value itself or a promise.

  • fn Function

    Function to be called with the evaluated value