recorder-to-wpt-script

1.6.1 • Public • Published

WebPageTest Logo

EXPERIMENTAL: Recorder-To-WPT-Script

Script to convert Chrome user flow recordings to WPT Custom Scripts

Takes the path to a recorder JSON file and returns a WebPageTest Custom Script.

contributions welcome

Requirements

Usage

node index.js sample-recordings/simple-recorder.json

Screenshots of Script Paste this script into WPT custom script and see the magic happening

Steps to obtain Chrome user flow recordings

Refer to Recorder docs for more information on Chrome Recorder

#Open the Recorder panel

  • Open DevTools.
  • Click on More options --> More tools > Recorder.

Screenshots of Script

#Export the JSON


NOTE

  • Only Chrome v101 and above i.e. Google Chrome Developer and Google Chrome Canary exports these json scripts.
  • Make sure that your recording plays back correctly in Chrome before feeding it into The Recorder Script (To obtain the expected outcome)

After you are done with the recording

  • Click on export icon and select "Export as a JSON file"

Screenshots of Script

Once that is done, feed the JSON into the recorder script to generate the WPT custom script

Currently Supported Recorder Commands

  • navigate (maps to navigate)
  • click (maps to execAndWait)
  • change (maps to execAndWait)
  • keydown (maps to execAndWait)
  • keyup (maps to execAndWait)
  • waitForElement (maps to waitFor)
  • waitForExpression (maps to waitFor)
  • doubleClick (maps to execAndWait)
  • scroll (maps to execAndWait)

Resources


NOTE

  • Only Chrome v101 and above i.e. Google Chrome Developer and Google Chrome Canary exports these json scripts.
  • There are some websites having issues with chrome recorder, this issue will be resolved with time as Google developers improve Chrome

Readme

Keywords

none

Package Sidebar

Install

npm i recorder-to-wpt-script

Weekly Downloads

0

Version

1.6.1

License

ISC

Unpacked Size

474 kB

Total Files

15

Last publish

Collaborators

  • tkadlec
  • siddhantshukla
  • lbartoli