UNPKG

@testim/testim-cli

Version:

Command line interface for running Testing on you CI

29 lines (23 loc) 575 B
/** * * send a key event to the device * * @param {Number} keyValue device specifc key value * * @see https://github.com/appium/appium/blob/master/docs/en/appium-bindings.md#key-event * @type appium * */ module.exports = function deviceKeyEvent(keycode, metastate) { var data = { keycode: keycode }; if(metastate) { data.metastate = metastate; } var requestOptions = { path: '/session/:sessionId/appium/device/keyevent', method: 'POST' }; return this.requestHandler.create(requestOptions, data); };