UNPKG

@testim/testim-cli

Version:

Command line interface for running Testing on you CI

25 lines (20 loc) 683 B
/** * * Single tap on the touch enabled device. * * @param {String} ID ID of a WebElement JSON object to route the command to * * @see http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/click * @type protocol * */ var ErrorHandler = require('../utils/ErrorHandler.js'); module.exports = function touchClick (id) { if(typeof id !== 'string' && typeof id !== 'number') { throw new ErrorHandler.ProtocolError('number or type of arguments don\'t agree with elementIdCssProperty protocol command'); } return this.requestHandler.create( '/session/:sessionId/touch/click', { element: id.toString() } ); };