Skip to content

AkshayAmin05/e2e-playwright-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

e2e-playwright-python

End-to-end UI tests using Playwright with Python and Pytest.

Setup

  • Python 3.10+
  • Install dependencies: pip install -r requirement.txt
  • Install browsers: playwright install

Running tests

  • Run all tests: pytest -v
  • Headed mode: pytest -v --headed
  • Specify a test: pytest tests/test_checkout_flow.py::test_guest_checkout

Uploading this project to GitHub

Follow these steps to push this existing local project to a new GitHub repository.

Prerequisites:

  • A GitHub account
  • Git installed locally (git --version should work)

Steps:

  1. Initialize the local repository (if not already a git repo)
    • In the project root, run: git init
  2. Set your name and email (one-time global setup)
    • git config --global user.name "Your Name"
    • git config --global user.email "you@example.com"
  3. Ensure the .gitignore file exists (this repo provides one). Stage files:
    • git add .
  4. Make the first commit:
    • git commit -m "Initial commit: Playwright Python E2E project"
  5. Create a new repository on GitHub
    • Go to https://github.com/new
    • Choose the repository name (e.g., e2e-playwright-python), set visibility, and click "Create repository"
  6. Connect your local repo to GitHub
    • Copy the commands GitHub shows after creation. Typically one of:
      • Using HTTPS:
        • git remote add origin https://github.com/<your-username>/<repo-name>.git
      • Or using SSH (recommended if you use SSH keys):
        • git remote add origin git@github.com:<your-username>/<repo-name>.git
  7. Push your code
    • If your local default branch is main:
      • git branch -M main
      • git push -u origin main
    • If you prefer master, adapt the branch name accordingly.

Authentication tips:

Updating later:

  • After making changes: git add -A && git commit -m "Describe your change" && git push

CI (optional)

You can add GitHub Actions for automatic test runs. Example workflow (save as .github/workflows/ci.yml):

name: CI
on: [push, pull_request]
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.10'
      - run: pip install -r requirement.txt
      - run: npx playwright install --with-deps
      - run: pytest -v

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages