wordRotator/tests/lib/PromiseSelector.js
2020-10-17 16:42:59 +02:00

20 lines
612 B
JavaScript

const PromiseElement = require("./PromiseElement");
const PromiseElementList = require("./PromiseElementList");
function find(selector) {
return new PromiseElement($(selector));
}
function findCustom(strategy, selector) {
return new PromiseElement(custom$(strategy, selector));
}
function findMultiple(selector) {
return new PromiseElementList($$(selector, 200));
}
function findMultipleCustom(strategy, selector) {
return new PromiseElementList(custom$$(strategy, selector));
}
module.exports = {one: find, multiple: findMultiple, oneCustom: findCustom, multipleCustom: findMultipleCustom};