2021-08-02 17:17:20 -07:00
|
|
|
# class: TestStep
|
|
|
|
|
* langs: js
|
|
|
|
|
|
|
|
|
|
Represents a step in the [TestRun].
|
|
|
|
|
|
|
|
|
|
## property: TestStep.category
|
|
|
|
|
- type: <[string]>
|
|
|
|
|
|
|
|
|
|
Step category to differentiate steps with different origin and verbosity. Built-in categories are:
|
|
|
|
|
* `hook` for fixtures and hooks initialization and teardown
|
|
|
|
|
* `expect` for expect calls
|
|
|
|
|
* `pw:api` for Playwright API calls.
|
2021-08-17 16:41:36 -07:00
|
|
|
* `test.step` for test.step API calls.
|
2021-08-02 17:17:20 -07:00
|
|
|
|
|
|
|
|
## property: TestStep.duration
|
|
|
|
|
- type: <[float]>
|
|
|
|
|
|
|
|
|
|
Running time in milliseconds.
|
|
|
|
|
|
|
|
|
|
## property: TestStep.error
|
|
|
|
|
- type: <[void]|[TestError]>
|
|
|
|
|
|
|
|
|
|
An error thrown during the step execution, if any.
|
|
|
|
|
|
2021-08-17 16:41:36 -07:00
|
|
|
## property: TestStep.parent
|
|
|
|
|
- type: <[void]|[TestStep]>
|
|
|
|
|
|
|
|
|
|
Parent step, if any.
|
|
|
|
|
|
2021-08-02 17:17:20 -07:00
|
|
|
## property: TestStep.startTime
|
|
|
|
|
- type: <[Date]>
|
|
|
|
|
|
|
|
|
|
Start time of this particular test step.
|
|
|
|
|
|
2021-08-17 13:57:26 -07:00
|
|
|
## property: TestStep.steps
|
|
|
|
|
- type: <[Array]<[TestStep]>>
|
|
|
|
|
|
|
|
|
|
List of steps inside this step.
|
|
|
|
|
|
2021-08-02 17:17:20 -07:00
|
|
|
## property: TestStep.title
|
|
|
|
|
- type: <[string]>
|
|
|
|
|
|
|
|
|
|
User-friendly test step title.
|
2021-08-17 16:41:36 -07:00
|
|
|
|
|
|
|
|
## method: TestStep.titlePath
|
|
|
|
|
- returns: <[Array]<[string]>>
|
|
|
|
|
|
|
|
|
|
Returns a list of step titles from the root step down to this step.
|