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

21 lines (17 loc) 672 B
import logger from "../../reporting-helpers/logger"; import {browser, $, $$, expect} from '@wdio/globals' export default async function (website: string) { // await browser.url(website); // logger.info(`Navigating to website : ${website}`); // await browser.pause(1000); try { await browser.url(website); } catch (error) { console.warn('⚠️ Lost connection to browser context. Reloading session...'); await browser.reloadSession(); await browser.switchFrame(null); await browser.url(website); await browser.pause(2000); console.warn('✅ Connection is established now...'); } }