recorder-to-wpt-script
v1.6.1
Published
Script to convert Chrome user flow recordings to WPT Custom Scripts
Downloads
3
Readme
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.
Requirements
Usage
node index.js sample-recordings/simple-recorder.json
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 DevTools.
- Click on More options --> More tools > Recorder.
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"
Once that is done, feed the JSON into the recorder script to generate the WPT custom script
Currently Supported Recorder Commands
navigate
(maps tonavigate
)click
(maps toexecAndWait
)change
(maps toexecAndWait
)keydown
(maps toexecAndWait
)keyup
(maps toexecAndWait
)waitForElement
(maps towaitFor
)waitForExpression
(maps towaitFor
)doubleClick
(maps toexecAndWait
)scroll
(maps toexecAndWait
)
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