duration property

Class: TestResultsPlainPlatform: PlaywrightLanguage: JavaScript SDK:

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

Syntax

value = result.duration;

Type:number

The number of seconds the test ran for.