Skip to content

[Question]: Best practices for using page-objects as pytest fixtures and for implementing async methods #2008

Closed as not planned
@avielKogan1

Description

@avielKogan1

Your question

Hi!
I'm practicing playwright/pytest.
I wonder what would be the best practices for:

  1. Implementing page-objects as PyTest fixtures?
  2. Implementing async methods within page objects files.
  3. Using the page object fixures in the test files themselves.

This is the high-level structure of my project:

PROJECT
│ README.md

└───src

├───infra
│ │ init.py
│ │
│ └───page_objects
│ └───login
│ │ login_page.py

└───tests
└───sanity_tests
│ test_login.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions