UNPKG

@testwizard/commands-video

Version:

23 lines (16 loc) 606 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = require('./OCRResult'); class TextOCRCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'TextOCR'); } async execute(dictionary) { if (dictionary === undefined) throw new Error('dictionary is required'); const requestObj = [dictionary]; const json = await this.executeCommand(requestObj); return new Result(json, 'textOCR was successful', 'textOCR failed'); } } module.exports = TextOCRCommand;