Contributing to Playwright-BDD
October 20, 2025 ยท View on GitHub
Thank you for considering contributing to Playwright-BDD ๐
How can I contribute?
There are different ways to contribute:
Write an article
We encourage you to share your experience with Playwright-BDD. BDD workflows vary widely from team to team, and your insights can be very helpful for community.
Here are some good places to post:
- #playwright on dev.to
- #software-testing on Medium
- articles on Playwright Discord
- r/Playwright on reddit
- LinkedIn, X.com, etc
Report a bug or feature request
If you find a bug or have an idea for a feature:
- Check if the issue already exists in the Issues.
- If not, create a new issue!
Improve the docs
If you find a typo or an error in the Playwright-BDD docs, feel free to provide a fix right in the GitHub interface:
- Open the repo on the
docsbranch - Navigate to the
docsdirectory - Make your improvements in the
.mdfiles - Submit a pull request
Contribute to the code
When contributing a significant change, it's better to discuss it in the issues first.
- Fork the playwright-bdd repository.
- Clone your fork to your local machine:
git clone https://github.com/<YOUR_USERNAME>/playwright-bdd.git - Create a new branch for your feature or bug fix:
git checkout -b my-feature - Perform the development setup
- Make and commit your changes.
- Push the changes to your fork:
git push origin my-feature - Open a pull request to the
mainbranch.
Development setup
-
Navigate to the Playwright-BDD root directory:
cd playwright-bdd -
Install dependencies:
npm install -
Install Playwright browsers:
npx playwright install chromium -
Build project:
npm run build -
Run tests:
npm t # run specific test npm run only test/<test-name-in-directory> -
Run examples:
npm run examples # run specific example npm run examples examples/<example-name-in-directory>Note: you may need to run
npm run examplesbefore commiting, as some pre-commit checks rely on its generated output.
Useful dev commands
Run a single test
Use the command below (use TAB after typing test/ to autocomplete the test path):
npm run only test/TEST_DIR_NAME
Example:
npm run only test/special-tags
Switch Playwright version
This command will install the provided Playwright version without saving it to package.json:
npx cross-env PW=1.45 npm run pw
Install Playwright browsers
This command will install chromium for the current Playwright version, without clearing previous browsers:
npm run pw:install
Check deprecated Playwright versions
npm show @playwright/test@1 deprecated
Clear Playwright compilation cache
npx playwright clear-cache