Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

@ -0,0 +1,26 @@
/**
* Put finger on an element (only in mobile context).
*
* @alias browser.touch
* @param {String} selector element to put finger on
* @param {Boolean} longClick if true touch click will be long (default: false)
* @uses property/getLocation, protocol/touchClick
* @type mobile
* @uses android
*
*/
let touch = function (selector, longClick) {
/**
* we can't use default values for function parameter here because this would
* break the ability to chain the command with an element if reverse is used
*/
longClick = typeof longClick === 'boolean' ? longClick : false
const touchCommand = longClick ? 'touchLongClick' : 'touchClick'
return this.getLocation(selector).then((val) =>
this[touchCommand](val.x, val.y))
}
export default touch