webdriverio-workflo
Version:
This is a customized version of webdriverio for use with workflo framework.
36 lines (33 loc) • 1.01 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = touchId;
/**
*
* Simulate Touch ID with either valid (match == true) or invalid (match == false) fingerprint.
*
* <example>
:touchId.js
it('should simulate fingerprint', function () {
browser.touchId(); // simulates valid fingerprint
browser.touchId(true); // simulates valid fingerprint
browser.touchId(false); // simulates invalid fingerprint
});
* </example>
*
* @param {Boolean} match if true the command simulates a valid fingerprint
*
* @type mobile
* @for ios
* @see https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md
*
*/
function touchId() {
var match = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
return this.requestHandler.create({
path: '/session/:sessionId/appium/simulator/touch_id',
method: 'POST'
}, { match });
}
module.exports = exports['default'];
;