Module: selenium-webdriver
View Source

# namespace stacktrace

Alias for `webdriver.stacktrace`

## Functions

### format(error)code »

Formats an error's stack trace.

Parameters

error`Error`

  The error to format.

Returns

`Error`

  The formatted error.

### get()code »

Gets the native stack trace if available otherwise follows the call chain. The generated trace will exclude all frames up to and including the call to this function.

Returns

`Array<webdriver.stacktrace.Frame>`

  The frames of the stack trace.

### getStack(error)code »

Get an error's stack trace with the error string trimmed. V8 prepends the string representation of an error to its stack trace. This function trims the string so that the stack trace can be parsed consistently with the other JS engines.

Parameters

error`Error`

  The error.

Returns

`string`

  The stack trace string.

## Properties

BROWSER_SUPPORTED `boolean`

  Whether the current browser supports stack traces.

## Types

Frame

  Class representing one stack frame.

Snapshot

  Stores a snapshot of the stack trace at the time this instance was created.