@testwizard/commands-video
Version:
25 lines (18 loc) • 786 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = Commands.ResultForOkAndErrorCode;
class StartBackgroundCaptureCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'StartBGCapture');
}
async execute(stepsize, captures) {
if (stepsize === undefined)
throw new Error('stepsize is required');
if (captures === undefined)
throw new Error('captures is required');
const requestObj = [stepsize, captures];
const json = await this.executeCommand(requestObj);
return new Result(json, 'startBackgroundCapture was successful', 'startBackgroundCapture failed');
}
}
module.exports = StartBackgroundCaptureCommand;