Skip to content

qa-danny/Playwright-Demo

Repository files navigation

Playwright-Demo

This is a small Playwright Test project (TypeScript) with a few example tests and page object models.

Quick overview

  • Playwright + @playwright/test v1.56.x
  • Tests live in tests/
  • Page object models in pages/
  • Fixtures in fixtures/ configure homePage and articlePage

Prerequisites

  • Node.js
  • npm

macOS quick install (Homebrew):

brew install node

Getting started (from a fresh clone)

  1. Clone the repository:
git clone https://github.com/qa-danny/Playwright-Demo.git
cd Playwright-Demo
  1. Install node dependencies:
npm install
  • or -
npm ci
  1. Install Playwright:
npx playwright install

Running tests

Run all tests:

npx playwright test

Run a single file:

npx playwright test tests/example.test.ts

Run tests headed (view in browser):

npx playwright test --headed

Run a single test by name (grep):

npx playwright test -g "has title"

Run a single file in only Chromium, viewing in browser:

npx playwright test tests/example.test.ts --headed --project=chromium

About

Playwright Demo tests I've created

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published