This is a small Playwright Test project (TypeScript) with a few example tests and page object models.
- Playwright + @playwright/test v1.56.x
- Tests live in
tests/ - Page object models in
pages/ - Fixtures in
fixtures/configurehomePageandarticlePage
- Node.js
- npm
macOS quick install (Homebrew):
brew install node- Clone the repository:
git clone https://github.com/qa-danny/Playwright-Demo.git
cd Playwright-Demo- Install node dependencies:
npm install- or -
npm ci- Install Playwright:
npx playwright installRun all tests:
npx playwright testRun a single file:
npx playwright test tests/example.test.tsRun tests headed (view in browser):
npx playwright test --headedRun 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