API Docs for: 0.2.7
Show:

Driver Class

Defined in: lib/driver.js:31
Module: Core
Parent Module: WebDriver

Create a new Driver session, remember to call .dispose() at the end to terminate the session.

Constructor

Driver

(
  • remote
  • capabilities
  • options
)

Defined in lib/driver.js:31

Parameters:

Methods

_createSession

(
  • desiredCapabilities
  • [requiredCapabilities]
)
Session private

Defined in lib/driver.js:316

Create a selenium session

Parameters:

  • desiredCapabilities Object
  • [requiredCapabilities] Object optional

Returns:

_getValue

(
  • [value]
)
protected

Defined in lib/driver.js:170

Returns value according to mode

Parameters:

  • [value] optional

Returns:

:

_logMethodCall

(
  • event
)
protected

Defined in lib/driver.js:339

Trigger an event to log the method-call

Parameters:

_requestJSON

(
  • method
  • path
  • [body]
  • [options]
)
protected

Defined in lib/driver.js:357

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

Parameters:

Returns:

:

_session

() Session private

Defined in lib/driver.js:458

Get the session object of current session

Note: This function call is not logged!

Returns:

adjust

(
  • [options]
)

Defined in lib/driver.js:480

Available since 0.2.6

Adjusts the configurations according to the browsers behavior.

Note: This is needed especially when screenshots should be taken since browsers behave here very different from each other.

Needs to be called only once per taxi instance.

Parameters:

  • [options] Object optional

    Preparation options

    • [url='http://www.example.org'] Int optional

      Default website for adjustment for browser

    • [horizontalPadding=0] Int optional

      Padding of the document

browser

() Browser

Defined in lib/driver.js:514

Gets the browser object. Direct-access. No need to wait.

Returns:

browserId

() String

Defined in lib/driver.js:268

Gets a complete identifier of selected browser (+ version) and platform

Returns:

browserName

() String

Defined in lib/driver.js:218

Gets the name of the browser

Returns:

browserVersion

() String

Defined in lib/driver.js:228

Gets the version of the browser

Returns:

chain

() Chain

Defined in lib/driver.js:550

Get the chain object. Direct-access. No need to wait.

Returns:

compatibility

() Compatibility

Defined in lib/driver.js:561

Get the compatibility object. Direct-access. No need to wait.

Returns:

deviceName

() String

Defined in lib/driver.js:248

Gets the name of the device

Returns:

deviceOrientation

() String

Defined in lib/driver.js:258

Gets the orientation of the device

Returns:

dispose

(
  • [status]
)

Defined in lib/driver.js:614

End this Driver session

Parameters:

getApplicationCacheStatus

() Number

Defined in lib/driver.js:573

Get the status of the html5 application cache

Returns:

getLogs

(
  • logType
)
Array.

Defined in lib/driver.js:584

Get the log for a given log type. Log buffer is reset after each request.

Parameters:

Returns:

Array.:

getLogTypes

() Array.

Defined in lib/driver.js:603

Get available log types

Returns:

Array.:

getSessions

(
  • remote
  • mode
)
Array.

Defined in lib/driver.js:145

Returns a list of the currently active sessions

Note: Appears not to be supported by the selenium-standalone-server!

Parameters:

Returns:

Array.:

getStatus

(
  • remote
  • mode
)
Status

Defined in lib/driver.js:129

Gets the selenium-system status

Parameters:

Returns:

getValue

(
  • name
)

Defined in lib/driver.js:293

Gets a value of the value registry

Parameters:

Returns:

:

helpers

() Utils

Defined in lib/driver.js:538

Get the helpers object. Direct-access. No need to wait.

Returns:

isAsync

() Boolean

Defined in lib/driver.js:207

Is driver in async-mode?

Returns:

isSync

() Boolean

Defined in lib/driver.js:197

Is driver in sync-mode?

Returns:

platform

() String

Defined in lib/driver.js:238

Gets the name of the platform (including platform version)

Returns:

quit

()

Defined in lib/driver.js:643

End this Driver session

Alias for dispose

sauceJobUpdate

(
  • body
)
Boolean

Defined in lib/driver.js:664

Sauce Labs Methods

Parameters:

Returns:

session

() Session

Defined in lib/driver.js:471

Get the session object of current session

Returns:

sessionStorage

() SessionStorage

Defined in lib/driver.js:652

Get the Session-Storage object. Direct-access. No need to wait.

Returns:

setValue

(
  • name
  • value
)

Defined in lib/driver.js:304

Sets the value of an entry in the registry

Parameters:

timeOut

() TimeOut

Defined in lib/driver.js:526

Get the time-out object. Direct-access. No need to wait.

Returns:

Properties

APPLICATION_CACHE_CHECKING

Int static

Defined in lib/driver.js:417

Status of the HTML5 application cache - Checking

APPLICATION_CACHE_DOWNLOADING

Int static

Defined in lib/driver.js:426

Status of the HTML5 application cache - Downloading

APPLICATION_CACHE_IDLE

Int static

Defined in lib/driver.js:408

Status of the HTML5 application cache - Idle

APPLICATION_CACHE_OBSOLETE

Int static

Defined in lib/driver.js:444

Status of the HTML5 application cache - Obsolete

APPLICATION_CACHE_UNCACHED

Int static

Defined in lib/driver.js:399

Status of the HTML5 application cache - Uncached

APPLICATION_CACHE_UPDATE_READY

Int static

Defined in lib/driver.js:435

Status of the HTML5 application cache - Update-ready

MODE_ASYNC

String static

Defined in lib/driver.js:389

Async-mode of web-driver requests

MODE_SYNC

String static

Defined in lib/driver.js:380

Sync-mode of web-driver requests

Events

disposed

Defined in lib/driver.js:118

Fired when the session is destroyed

method-call

Defined in lib/driver.js:111

Fired when a public method is called

Event Payload:

  • event Object

    Method event data

request

Defined in lib/driver.js:97

Fired when a request is made

Event Payload:

  • request Object

    Request options

response

Defined in lib/driver.js:104

Fired when a response is received

Event Payload:

  • response Object

    Response data