UNPKG

tm-playwright-framework

Version:

Playwright Cucumber TS framework - The easiest way to learn

52 lines (51 loc) 2.16 kB
/** * GLOBAL.TS * * This TypeScript file instantiates all core classes and provides access to their methods and members. * * @author Sasitharan, Govindharam * @reviewer Sahoo, AshokKumar * @version 1.0 - 1st-JUNE-2025 * * @hooks * - `constructor`: Instantiates all core classes when this class is instantiated. * - `setScenarioName`: Sets the scenario name which is currently in execution. * - `page`: Returns the fixture's page to perform certain Playwright actions. * - `getInstance`: Returns the instance of this class, allowing access to all core classes. */ import MouseAction from 'tm-playwright-framework/dist/actions/mouse.js'; import KeyboardActions from 'tm-playwright-framework/dist/actions/keyboard.js'; import Assertion from 'tm-playwright-framework/dist/assertion/assertion.js'; import ApiAssertion from 'tm-playwright-framework/dist/assertion/apiAssertion.js'; import Elements from 'tm-playwright-framework/dist/actions/element.js'; import BrowserActions from 'tm-playwright-framework/dist/browser/browserManager.js'; import Logger from 'tm-playwright-framework/dist/report/logger.js'; import DropdownActions from 'tm-playwright-framework/dist/actions/dropdown.js'; import CheckboxActions from 'tm-playwright-framework/dist/actions/checkbox.js'; import RadioButtonActions from 'tm-playwright-framework/dist/actions/radiobutton.js'; import FileUploadActions from 'tm-playwright-framework/dist/actions/files.js'; export default class CoreFramework { private static instance; SendKeys: KeyboardActions; Mouse: MouseAction; Assert: Assertion; ApiAssert: ApiAssertion; Element: Elements; Browser: BrowserActions; Logger: Logger; Dropdown: DropdownActions; CheckBox: CheckboxActions; RadioButton: RadioButtonActions; FileUpload: FileUploadActions; scenarioName: string; private constructor(); setScenarioName(scenarioName: string): void; page(): import("playwright").Page; static getInstance(): CoreFramework; } export declare class FeatureContext { runData: { [key: string]: any; }; } export declare const featureContextMap: Map<string, FeatureContext>;