Files
enviPy-bayer/static/js/ketcher2/node_modules/webdriverio/lib/protocol/touchLongClick.js
2025-06-23 20:13:54 +02:00

24 lines
722 B
JavaScript

/**
*
* Long press on the touch screen using finger motion events. Depcrecated! Please use `touchPerform` instead.
*
* @param {String} id ID of the element to long press on
*
* @see https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchlongclick
* @type protocol
* @for android
*
*/
import { ProtocolError } from '../utils/ErrorHandler'
export default function touchLongClick (id) {
if (typeof id !== 'string' && typeof id !== 'number') {
throw new ProtocolError('number or type of arguments don\'t agree with touchLongClick protocol command')
}
return this.requestHandler.create('/session/:sessionId/touch/longclick', {
element: id.toString()
})
}