@testwizard/commands-mobile
Version:
23 lines (16 loc) • 663 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = Commands.ResultForOkAndErrorMessage;
class TouchAction_WaitCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'Mobile.TouchAction_Wait');
}
async execute(duration) {
if (duration === undefined)
throw new Error('duration is required');
const requestObj = [duration];
const json = await this.executeCommand(requestObj);
return new Result(json, 'touchAction_Wait was successful', 'touchAction_Wait failed');
}
}
module.exports = TouchAction_WaitCommand;