appium-geckodriver
Version:
Appium driver for Gecko-based browsers and web views
25 lines • 783 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.findElOrEls = findElOrEls;
const support_1 = require("appium/support");
// This is needed to make lookup by image working
/**
*
* @this {GeckoDriver}
* @param {string} strategy
* @param {string} selector
* @param {boolean} mult
* @param {string} [context]
* @returns {Promise<any>}
*/
async function findElOrEls(strategy, selector, mult, context) {
const endpoint = `/element${context ? `/${support_1.util.unwrapElement(context)}/element` : ''}${mult ? 's' : ''}`;
return await this.gecko.proxy.command(endpoint, 'POST', {
using: strategy,
value: selector,
});
}
/**
* @typedef {import('../driver').GeckoDriver} GeckoDriver
*/
//# sourceMappingURL=find.js.map