Skip to content

Using fixtures with the framework setup #26

@amit42147

Description

@amit42147

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';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions