UNPKG

@christian-bromann/webdriverio

Version:

A nodejs bindings implementation for selenium 2.0/webdriver

26 lines (22 loc) 814 B
/** * * Click and hold the left mouse button (at the coordinates set by the last moveto * command). Note that the next mouse-related command that should follow is buttonup. * Any other mouse command (such as click or another call to buttondown) will yield * undefined behaviour. * * @param {Number} button Which button, enum: *{LEFT = 0, MIDDLE = 1 , RIGHT = 2}*. Defaults to the left mouse button if not specified. * * @see https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttondown * @type protocol * */ import handleMouseButtonProtocol from '../helpers/handleMouseButtonProtocol' let buttonDown = function (button) { return handleMouseButtonProtocol.call( this, '/session/:sessionId/buttondown', button ) } export default buttonDown