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

20 lines (14 loc) 485 B
export class ParseData { public static getEnvData(key: string): string { const value = process.env[key]; if (!value) throw Error(`No Environment variable found for ${key}`); return value; } public static getJsonFromFile<T = Record<string, string>>(path: string): T { return require(`${process.cwd()}${path}`) } public static envNumber(key: string): number { return Number(ParseData.getEnvData(key)); } }