UNPKG

@testwizard/commands-mobile

Version:

22 lines (16 loc) 636 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = Commands.ResultForOkAndErrorMessage; class RunAppInBackgroundCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'Mobile.RunAppInBackground'); } async execute(duration) { const requestObj = duration === undefined ? [] : [duration]; const json = await this.executeCommand(requestObj); return new Result(json, 'runAppInBackground was successful', 'runAppInBackground failed'); } } module.exports = RunAppInBackgroundCommand;