UNPKG

@testwizard/commands-video

Version:

35 lines (28 loc) 1.29 kB
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = require('./FindAllPatternLocationsResult'); class FindAllPatternLocationsExCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'FindAllPatternLocationsEx'); } async execute(filePath, mode, similarity, x, y, width, height) { if (filePath === undefined) throw new Error('filePath is required'); if (mode === undefined) throw new Error('mode is required'); if (similarity === undefined) throw new Error('similarity is required'); if (x === undefined) throw new Error('x is required'); if (y === undefined) throw new Error('y is required'); if (width === undefined) throw new Error('width is required'); if (height === undefined) throw new Error('height is required'); const requestObj = [filePath, mode, similarity, x, y, width, height]; const json = await this.executeCommand(requestObj); return new Result(json, 'findAllPatternLocationsEx was successful', 'findAllPatternLocationsEx failed'); } } module.exports = FindAllPatternLocationsExCommand;