.captureBrowserExceptions() Suggest edits
Since: 2.2.0Catch the JavaScript exceptions thrown in the browser.
captureBrowserExceptions()
is only available when using Chrome or Edge drivers.
Usage
.captureBrowserExceptions(callback)
Parameters
Name | Type | description |
---|---|---|
callback |
function | Callback function to be called when a new exception has taken place. |
Example
Or run locally with: