Skip to content

Replay a recording ​

In plain words

Playing back (replaying) means StepTrails repeats your recorded steps in a fresh browser and checks that each one still works. This page needs the helper programs from Part 2 of the set-up and a terminal.

Replay opens a clean browser, restores the recorded conditions and performs each step, checking the page as it goes.

Run a replay ​

bash
node bin/replay.js path/to/steptrails-recording.json

See Commands for every option. Common ones:

OptionEffect
--headedShow the browser
--continueKeep going after a failed step
--jsonPrint the full result as JSON

What is validated ​

For each step, replay:

  1. Waits until the browser is on the page the step was recorded on, otherwise fails with page mismatch.
  2. Finds the element, trying backup selectors if the first is gone, otherwise fails with element not found.
  3. Performs the action and records its duration.
  4. Takes a screenshot if the step failed.

Replay stops at the first failure unless you pass --continue.

Passwords and uploads ​

Passwords are never recorded, so supply them at replay time. The key is the field's selector as shown in the recording file.

bash
STEPTRAILS_SECRETS='{"#password":"my-password"}' node bin/replay.js recording.json
powershell
$env:STEPTRAILS_SECRETS='{"#password":"my-password"}'; node bin/replay.js recording.json

For uploads, set STEPTRAILS_FILES='{"#cv":["/full/path/to/cv.pdf"]}'. See Settings.

Environment differences ​

If the replay machine has a different screen size or timezone, a warning is printed and the replay still runs.

Next steps ​