@testwizard/commands-video
Version:
23 lines (16 loc) • 668 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = Commands.ResultForOkAndErrorCode;
class LoadReferenceBitmapCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'LoadReferenceBitmap');
}
async execute(filePath) {
if (filePath === undefined)
throw new Error('filePath is required');
const requestObj = [filePath];
const json = await this.executeCommand(requestObj);
return new Result(json, 'loadReferenceBitmap was successful', 'loadReferenceBitmap failed');
}
}
module.exports = LoadReferenceBitmapCommand;