@agnos-ui/base-po
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

@agnos-ui/base-po

npm

Base class to build page objects for end-to-end tests with Playwright.

Installation

npm install @agnos-ui/base-po

Usage

import {BasePO} from '@agnos-ui/base-po';
import {Locator} from '@playwright/test';

export const customComponentSelectors = {
	rootComponent: '.custom',
	otherContent: '.content-class',
};

export class CustomComponentPO extends BasePO {
	selectors = {...customComponentSelectors};

	override getComponentSelector(): string {
		return this.selectors.rootComponent;
	}

	get locatorOtherContent(): Locator {
		return this.locatorRoot.locator(this.selectors.otherContent);
	}
}

Main features

Please refer to the documentation included in the source code.

Package Sidebar

Install

npm i @agnos-ui/base-po

Weekly Downloads

2

Version

0.3.1

License

MIT

Unpacked Size

10.1 kB

Total Files

5

Last publish

Collaborators

  • qderoubaix
  • basso
  • divdavem