getDuration method

Class: TestResultsPlatform: Selenium 4Language: JavaScript SDK:

Use this method to retrieve the amount of time the test ran.

Syntax

let value = result.getDuration();
value = result.duration;

Note that this feature is available as both a method and a property.

Parameters

This method does not take any parameters.

Return value

Type: number
The number of seconds the test ran for.