UNPKG

@testwizard/commands-mobile

Version:

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