@testwizard/commands-mobile
Version:
23 lines (16 loc) • 643 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
const Result = Commands.ResultForOkAndErrorMessage;
class PinchElementCommand extends Commands.CommandBase {
constructor(testObject) {
super(testObject, 'Mobile.PinchElement');
}
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, 'pinchElement was successful', 'pinchElement failed');
}
}
module.exports = PinchElementCommand;