Skip to content

anhhtv56/pw-demo-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright Commands

Below is a list of commonly used Playwright commands for testing and debugging:

Installation

  • Install Playwright:
    npm init playwright@latest
    

Running Tests

  • Run all test cases:
    npx playwright test
    
  • Show the test report:
    npx playwright show-report
    
  • Run tests for a specific project (e.g., Chromium):
    npx playwright test --project=chromium
    
  • Run tests in headed mode (with browser UI):
    npx playwright test --project=chromium --headed
    
  • Run a specific test file:
    npx playwright test example.spec.ts --project=chromium
    
  • Run a specific test case by name:
    npx playwright test -g "has title" --project=chromium
    

Debugging and Tracing

  • Run tests in UI mode:
    npx playwright test --ui
    
  • Run tests with tracing enabled:
    npx playwright test --project=chromium --trace on
    
  • Run tests in debug mode:
    npx playwright test --project=chromium --debug
    

Reports and Snapshots

  • Update snapshots for visual testing:
    npx playwright test --update-snapshots
    

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors