UNPKG

@testwizard/commands-mobile

Version:

25 lines (18 loc) 713 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = Commands.ResultForOkAndErrorMessage; class TouchAction_TapCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'Mobile.TouchAction_Tap'); } async execute(x, y) { if (x === undefined) throw new Error('x is required'); if (y === undefined) throw new Error('y is required'); const requestObj = [x, y]; const json = await this.executeCommand(requestObj); return new Result(json, 'touchAction_Tap was successful', 'touchAction_Tap failed'); } } module.exports = TouchAction_TapCommand;