2021-08-02 17:17:20 -07:00
|
|
|
# class: TestStep
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-02 17:17:20 -07:00
|
|
|
* langs: js
|
|
|
|
|
|
|
|
|
|
Represents a step in the [TestRun].
|
|
|
|
|
|
|
|
|
|
## property: TestStep.category
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-02 17:17:20 -07:00
|
|
|
- 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
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-02 17:17:20 -07:00
|
|
|
- type: <[float]>
|
|
|
|
|
|
|
|
|
|
Running time in milliseconds.
|
|
|
|
|
|
2021-10-18 20:06:18 -08:00
|
|
|
## property: TestStep.location
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2022-04-06 19:02:10 -07:00
|
|
|
- type: ?<[Location]>
|
2021-10-18 20:06:18 -08:00
|
|
|
|
2022-04-06 13:36:20 -07:00
|
|
|
Optional location in the source where the step is defined.
|
2021-10-18 20:06:18 -08:00
|
|
|
|
2021-08-02 17:17:20 -07:00
|
|
|
## property: TestStep.error
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2022-04-06 19:02:10 -07:00
|
|
|
- type: ?<[TestError]>
|
2021-08-02 17:17:20 -07:00
|
|
|
|
2022-04-06 19:02:10 -07:00
|
|
|
Error thrown during the step execution, if any.
|
2021-08-02 17:17:20 -07:00
|
|
|
|
2021-08-17 16:41:36 -07:00
|
|
|
## property: TestStep.parent
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2022-04-06 19:02:10 -07:00
|
|
|
- type: ?<[TestStep]>
|
2021-08-17 16:41:36 -07:00
|
|
|
|
2022-04-06 19:02:10 -07:00
|
|
|
Parent step, if any.
|
2021-08-17 16:41:36 -07:00
|
|
|
|
2021-08-02 17:17:20 -07:00
|
|
|
## property: TestStep.startTime
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-02 17:17:20 -07:00
|
|
|
- type: <[Date]>
|
|
|
|
|
|
|
|
|
|
Start time of this particular test step.
|
|
|
|
|
|
2021-08-17 13:57:26 -07:00
|
|
|
## property: TestStep.steps
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-17 13:57:26 -07:00
|
|
|
- type: <[Array]<[TestStep]>>
|
|
|
|
|
|
|
|
|
|
List of steps inside this step.
|
|
|
|
|
|
2021-08-02 17:17:20 -07:00
|
|
|
## property: TestStep.title
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-02 17:17:20 -07:00
|
|
|
- type: <[string]>
|
|
|
|
|
|
|
|
|
|
User-friendly test step title.
|
2021-08-17 16:41:36 -07:00
|
|
|
|
|
|
|
|
## method: TestStep.titlePath
|
2022-07-05 16:24:50 -08:00
|
|
|
* since: v1.10
|
2021-08-17 16:41:36 -07:00
|
|
|
- returns: <[Array]<[string]>>
|
|
|
|
|
|
|
|
|
|
Returns a list of step titles from the root step down to this step.
|