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