SideeX JavaScript API
SideeX JavaScript API is a JS library running on a webpage for recording and playing web browsing behavior. As opposed to acting as a browser web extension, the API can be directly embedded and used within a webpage via JavaScript .
Installation
npm i sideex-api
Example
Record and playback
/* orvar {SideeX} = require('sideex-api') */var sideex = ; sideexrecorderstart;//start recording/* Record a command For example: click at anywhere on the window, then you get a ClickAt command */sideexrecorder;//stop recordingconsole;//get the first recorded commandsideexplaybackstart;//replay the recorded commands
Save and load the recorded commands
var sideex = ; sideexrecorderstart;//start recording/* Record a command For example: click at anywhere on the window, then you get a ClickAt command */sideexrecorder;//stop recordingconsole;//get the record that you recordedlet jsonString = sideexfiletestSuite;//serialize the recorded commands to a JSON string //save the jsonString on your own sideexfiletestSuite;//load the jsonStringsideexplaybackstart;//replay the recorded commands
Change a recorded command to a user-defined action
var sideex = ; sideexrecorderstart;//start recording/* Record a command For example: click at anywhere on the window, then you get a ClickAt command */sideexrecorder;//stop recordingconsole;//get the first recorded commandlet command = sideexfilecommand;commandname = "myAction";//rename the command name to "myAction"console;//see the change of the command name//add a user-defined function for executing "myAction"sideexplayback;sideexplaybackstart;//replay the modified recorded commands