UNPKG

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

16 lines (13 loc) 710 B
import logger from "../../reporting-helpers/logger"; import {CustomExpect} from "../../common-helpers/custom-expect"; import {browser, $, $$, expect} from '@wdio/globals' export default async function (falseCase: boolean, expectedUrl: string) { const currentUrl = await browser.getUrl(); logger.info(`Current URL : ${currentUrl}`) logger.info(`Expected URL : ${expectedUrl}`) if (falseCase) { CustomExpect.expectNotToEqual(currentUrl, expectedUrl, `Current URL "${currentUrl}" and expected url "${expectedUrl}" are equal`) } else { CustomExpect.expectToEqual(currentUrl, expectedUrl, `Current URL "${currentUrl}" and expected url "${expectedUrl}" are not equal`) } };