UNPKG

@testwizard/commands-mobile

Version:

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