playback

playback

sideex.playback

Constructor

new playback()

Methods

addCustomCommand(cmdName, verifyLocator, commandFunction)

Add customize command for playback

Parameters:
Name Type Default Description
cmdName string

Command name

verifyLocator boolean true

Is the target a locator(a yellow box appears before running)

commandFunction function

The commandFunction that you declared

findElement(locator) → {Element}

Find an element by a supported locator

Parameters:
Name Type Description
locator string

The locator of element

Returns:

Element object

Type
Element

getClientXY(element, coordString) → {Array.<number>}

Find the element location

Parameters:
Name Type Description
element Element

Element object

coordString string

coordString

Returns:

element's X, Y

Type
Array.<number>

pause()

Pause playing

Example
import {SideeX} from "sideex-api"
var sideex = new SideeX();
sideex.playback.start();
sideex.playback.pause();
sideex.playback.resume();

resume()

Resume playing

Example
import {SideeX} from "sideex-api"
var sideex = new SideeX();
sideex.playback.start();
sideex.playback.pause();
sideex.playback.resume();

start(modeopt, idStringopt, speedopt)

Start playing

Example
import {SideeX} from "sideex-api"
var sideex = new SideeX();
//you should have some test cases or commands first.
//choose a mode to do playback.
sideex.playback.start("all");//play all test suites.
sideex.playback.start("suite");//play the test suite you selected.
sideex.playback.start("case");//play the test case you selected.
sideex.playback.stop();
Parameters:
Name Type Attributes Default Description
mode "all" | "suite" | "case" <optional>
"all"

The mode to play -- (mode == "all"): Play all the test suites, (mode == "suite"): Play the test suite you selected, (mode == "case"): Play the test case you selected,

idString string <optional>
selectedCaseId | selectedSuiteId

(mode == "all"): test case's id, (mode == "suite"): test suite's id (mode == "case"): test case's id

speed number <optional>
5

The play speed (1 ~ 5)

stop()

Stop playing

Example
import {SideeX} from "sideex-api"
var sideex = new SideeX();
sideex.playback.start();
sideex.playback.stop();

Type Definitions

commandFunction(target, value)

The function of your own command - declare by yourself

Parameters:
Name Type Description
target string

The command's target

value string

The command's value

selectedCaseId

selectedCaseId

  • The test case id that currently selected
Type:
  • string

selectedSuiteId

selectedSuiteId

  • The test suite id that currently selected
Type:
  • string