tlc-core-automation-framework-v3-wdio-v9
Version:
Background: - We are following multi-layer automation framework architecture using webdriver.io + cucumber + typescript This core framework has been implemented with generic utility functions and cucumber steps, which can be easily consumed by another fra
26 lines • 1.87 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
/**
* Check if the given string is in the URL path
* @param {String} falseCase Whether to check if the given string is in
* the URL path or not
* @param {String} expectedUrlPart The string to check for
*/
const custom_expect_1 = require("../../common-helpers/custom-expect");
const globals_1 = require("@wdio/globals");
async function default_1(falseCase, expectedUrlPart) {
/**
* The URL of the current browser window
* @type {String}
*/
const currentUrl = await globals_1.browser.getUrl();
if (falseCase) {
custom_expect_1.CustomExpect.expectNotToContain(currentUrl, expectedUrlPart, `Current URL "${currentUrl}" contains expected url path "${expectedUrlPart}"`);
}
else {
custom_expect_1.CustomExpect.expectToContain(currentUrl, expectedUrlPart, `Current URL "${currentUrl}" does not contain expected url path "${expectedUrlPart}"`);
}
}
;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tJblVSTFBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvZTJlL2hlbHBlcnMvZnJhbWV3b3JrLWhlbHBlcnMvY2hlY2svY2hlY2tJblVSTFBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSw0QkFZQztBQXJCRDs7Ozs7R0FLRztBQUNILHNFQUFnRTtBQUNoRSwyQ0FBb0Q7QUFFckMsS0FBSyxvQkFBVyxTQUFrQixFQUFFLGVBQXVCO0lBQ3RFOzs7T0FHRztJQUNILE1BQU0sVUFBVSxHQUFHLE1BQU0saUJBQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQztJQUUxQyxJQUFJLFNBQVMsRUFBRSxDQUFDO1FBQ1osNEJBQVksQ0FBQyxrQkFBa0IsQ0FBQyxVQUFVLEVBQUUsZUFBZSxFQUFFLGdCQUFnQixVQUFVLGlDQUFpQyxlQUFlLEdBQUcsQ0FBQyxDQUFBO0lBQy9JLENBQUM7U0FBTSxDQUFDO1FBQ0osNEJBQVksQ0FBQyxlQUFlLENBQUMsVUFBVSxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsVUFBVSx5Q0FBeUMsZUFBZSxHQUFHLENBQUMsQ0FBQTtJQUNwSixDQUFDO0FBQ0wsQ0FBQztBQUFBLENBQUMifQ==