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

14 lines (10 loc) 553 B
import {CustomExpect} from "../../common-helpers/custom-expect"; import {browser, $, $$, expect} from '@wdio/globals' export default async function (falseCase: boolean, expectedTitle: string) { const title = await browser.getTitle(); if (falseCase) { CustomExpect.expectNotToContain(title, expectedTitle, `Actual title "${title}" contains expected title "${expectedTitle}"`) } else { CustomExpect.expectToContain(title, expectedTitle, `Actual title "${title}" does not contain expected title "${expectedTitle}"`) } };