Getting started

What is Replay SDK ?

The Replay SDK is a JavaScript SDK created for website developers, designed specifically for automating the simulation of user behavior. It allows for easy integration into standard web sites, Chrome Extensions, and Electron, requiring only some static data and instructions to automatically simulate various user interactions. Whether you wish to simulate a single click action or a series of complex inputs and operations, the Replay SDK can easily help you achieve this.

This is a minimal example:

import ReplaySDK from 'imean-replay-sdk';

ReplaySDK.init({
  mode: 'Default',
  workflow: {
    id: 'Create Event',
    steps: [
      {
        title: 'Click Create',
        id: 'AhPPa81go4KMr5CotK2eJ',
        type: 'Action',
        selector: '.mr0WL ',
        actionType: 'click',
        value: 'Create'
      },
      {
        title: 'Click Event',
        id: 'VS6c_J4nOALtUnk3mWVGW',
        type: 'Action',
        selector: '.z80M1.QJXRJc.FwR7Pc >.uyYuVb.oJeWuf >.jO7h3c ',
        actionType: 'click',
        value: 'Event'
      },
      {
        title: 'Type Title Conetnt',
        id: 'jOoGrFIxBo5UMA7i3VsrC',
        type: 'Action',
        selector: '#c96 ',
        actionType: 'type',
        value: 'test'
      },
      {
        title: 'Click Save',
        id: 'TzOr7UO2_oHTsU9youDhH',
        type: 'Action',
        selector:
          '.VfPpkd-LgbsSe.VfPpkd-LgbsSe-OWXEXe-k8QpJ.VfPpkd-LgbsSe-OWXEXe-dgl2Hf.nCP5yc.AjY5Oe.DuMIQc.LQeN7.pEVtpe >.VfPpkd-vQzf8d ',
        actionType: 'type',
        value: 'Save'
      }
    ]
  }
});

ReplaySDK.runAutomation({ index: 0 });

The effect is as follows:

The example above showcases the basic capabilities of the Replay SDK:

  1. The initialization flow, such as creating an event named "Create Event" in Google Calendar.

  2. Through the runAutomation()command, the process can be automatically executed.

Last updated