@christian-bromann/webdriverio
Version:
A nodejs bindings implementation for selenium 2.0/webdriver
27 lines (22 loc) • 751 B
JavaScript
/**
*
* Single tap on the touch enabled device. Depcrecated! Please use `touchPerform` instead.
*
* @param {String} ID ID of a WebElement JSON object to route the command to
*
* @see https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchclick
* @type protocol
* @for android
* @depcrecated
*
*/
import { ProtocolError } from '../utils/ErrorHandler'
let touchClick = function (id) {
if (typeof id !== 'string' && typeof id !== 'number') {
throw new ProtocolError('number or type of arguments don\'t agree with elementIdCssProperty protocol command')
}
return this.requestHandler.create('/session/:sessionId/touch/click', {
element: id.toString()
})
}
export default touchClick