Skip to content

keithwhitson/playwright_pytest_bdd_example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright Python pytest_bdd example

  • Depends on pytest-playwright
  • pip install pytest-playwright
  • pip install pytest-bdd
  • playwright install

Playwright Documentation

https://playwright.dev/python/docs/intro

pytest-bdd Documentation

See https://pypi.org/project/pytest-bdd/ for reporting options.

Page Object example

This test is using a standard page object model, where the selectors and functions are group inside a class.

Example is given with and without the bdd layer

Alternative format that uses files instead of objects to group the pages can be found here

Recommended plugins:

pytest-xdist - used to run multiple tests at the same time pytest-html - for nice simple html report

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • Gherkin 3.0%