Skip to main content

TestStep

Represents a step in the [TestRun].

testStep.titlePath()

Added in: v1.10

Returns a list of step titles from the root step down to this step.

testStep.category

Added in: v1.10

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.
  • test.step for test.step API calls.

testStep.duration

Added in: v1.10

Running time in milliseconds.

testStep.error

Added in: v1.10

Error thrown during the step execution, if any.

testStep.location

Added in: v1.10

Optional location in the source where the step is defined.

testStep.parent

Added in: v1.10

Parent step, if any.

testStep.startTime

Added in: v1.10
  • type: <[Date]>

Start time of this particular test step.

testStep.steps

Added in: v1.10

List of steps inside this step.

testStep.title

Added in: v1.10

User-friendly test step title.