UNPKG

@tshifhiwa/ohrm-ui-automation-framework

Version:

Playwright and TypeScript–based test automation framework for validating core UI features and workflows of the OrangeHRM demo application.

39 lines (30 loc) 906 B
import type { Page } from "@playwright/test"; import { PageActionsContainer } from "./internal/pageActionsContainer.js"; import type { IPageActions } from "../base/internal/types/pageActions.js"; export class BasePage { public readonly page: Page; protected readonly actions: IPageActions; constructor(page: Page, actions?: IPageActions) { this.page = page; this.actions = actions || new PageActionsContainer(page); } // Expose actions for easy access public get navigation() { return this.actions.navigation; } public get element() { return this.actions.element; } public get elementAssertions() { return this.actions.elementAssertions; } public get browser() { return this.actions.browser; } public get frame() { return this.actions.frame; } public get file() { return this.actions.file; } }