@nice-digital/wdio-cucumber-steps
Version:
Shared step definitions for Cucumber JS BDD tests in WebdriverIO
19 lines • 637 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isExisting = void 0;
/**
* Check if the given element exists in the current DOM
* @param {String} selector Element selector
* @param {String} falseCase Whether to check if the element exists or not
*/
async function isExisting(selector, falseCase) {
const elements = await $$(selector);
if (falseCase) {
expect(elements).toBeElementsArrayOfSize(0);
}
else {
expect(elements).toBeElementsArrayOfSize({ gte: 1 });
}
}
exports.isExisting = isExisting;
//# sourceMappingURL=isExisting.js.map