ReplaySDK
  • Getting started
  • Introduction
    • Quick Start
    • Best practices.
  • WorkFlow
    • Matcher
    • Trigger
    • Commands
    • Event
    • Fetch
    • Step
  • EXTENSIONS
    • Matcher
      • NearbyElementSelector
      • NearbyElementContent
      • Sequential
    • Trigger
      • ChromeDebugger
  • Guide
    • Logs (not supported)
    • Engine
      • Chrome
      • Electron (not supported)
    • Custom Plugin
  • Extra
    • Cli (not supported)
    • FAQ (not supported)
    • Open Extensions
Powered by GitBook
On this page
  • Requirement:
  • Dependencies
  • Quick Start in a React Application
  • Importing the Replay SDK via CDN
  • Try Replay SDK Online
  1. Introduction

Quick Start

PreviousGetting startedNextBest practices.

Last updated 12 months ago

Requirement:

  • >= 55

Dependencies

# with npm
npm install imean-replay-sdk

# with yarn
yarn add imean-replay-sdk

# with pnpm
pnpm add imean-replay-sdk

Quick Start in a React Application

import { FC, useEffect } from 'react';
import ReplaySDK from 'imean-replay-sdk';

interface ReplaySDKControllerProps {}

const ReplaySDKController: FC<ReplaySDKControllerProps> = () => {

  useEffect(() => {
    void(async()=>{
      await ReplaySDK.init({
        mode:'xxx',
        workflow:'xxx'
      });
      
      await ReplaySDK.runAutomation({
        index: 0
      });
    })()
    
  }, []);

  return null;
};

export default ReplaySDK;

Importing the Replay SDK via CDN

<script src="xxx"></script>

<button id="app">button</button>

<script>
  window.ReplaySDK.init({
    mode: 'Default',
    workflow: {
      id: 'test',
      steps: [
        {
          title: 'Click Button',
          id: 'AhPPa81go4KMr5CotK2eJ',
          type: 'Action',
          selector: '#app ',
          actionType: 'click',
          value: ''
        }
      ]
    }
  });
  window.ReplaySDK.runAutomation({ index: 0 });
</script>

Try Replay SDK Online

Preview the effect, please open a new tab page to view.:

Chromium
https://codesandbox.io/p/devbox/replaysdk-demo-vwzftm
https://vwzftm-5173.csb.app/