Playwright Typescript Automation testing framework Template is designed for Web (Desktop & Mobile), API, and Electron apps. Stable and Robust layer on top of Playwright with inbuilt Utilities, Linting, Logger, Web hooks, Github actions, Reports and much more
Hello Vasu31dev! What an awesome framework with utility methods and excellent understandability.
One unique thing about Playwright is the concept of fixtures or ability to create custom fixtures that can reduce code duplication and especially the import statements that can make a test file clunky.
Is there any way to create custom fixtures for the pages from page object folder that we can call in the tests so that statements like following can be removed or any other repeatable steps across all tests if they are stand alone - example login, import statements like below
import { click, clickAndNavigate, fill, gotoURL } from 'vasu-playwright-utils';
import { expectElementToBeVisible } from 'vasu-playwright-utils';
import { getLocator, getLocatorByPlaceholder, getLocatorByRole } from 'vasu-playwright-utils';
I'm writing to express my appreciation for your excellent framework.
I have a question regarding test execution isolation within the framework. While I understand the benefits of isolated tests, I'm interested in exploring the possibility of using the same page object across multiple tests in certain scenarios. Could you please provide guidance on how to achieve this effectively while maintaining test clarity and reliability?
Specifically, I'm interested in understanding:
Are there built-in mechanisms or best practices within the framework to support the use of same page for all the tests?
I appreciate any insights you can offer on this matter.