Module: selenium-webdriver/error
View Source

# class Error

    Error
      └ Error

Alias for `bot.Error`

Represents an error returned from a WebDriver command request.

### new Error(code, opt_message)

Parameters

code`number`

  The error's status code.

opt_message`string=`

  Optional error message.

## Instance Methods

### toString()code »

Returns

`string`

  The string representation of this error.

## Instance Properties

code `number`

  This error's status code.

description`string`

  IE-only.

fileName`string`

  Mozilla-only

isAutomationError `boolean`

  Flag used for duck-typing when this code is embedded in a Firefox extension. This is required since an Error thrown in one component and then reported to another will fail instanceof checks in the second component.

lineNumber`number`

  Mozilla-only.

message `string`
  No description.

name `string`
  No description.

sourceURL`?`

  Doesn't seem to exist, but closure/debug.js references it.

stack `string`
  No description.

state `string`
  No description.

## Types

Error.State

  Status strings enumerated in the W3C WebDriver protocol.