A simple Playwright starter project with example tests to help you get started with browser automation and testing.
npm install
npx playwright installRun all tests:
npm testRun tests in headed mode (visible browser):
npm run test:headedRun tests in UI mode (interactive):
npm run test:uiRun tests in debug mode:
npm run test:debugThis project includes several simple test examples:
- Loading a webpage and verifying the title
- Checking page headings
- Verifying URLs
- Clicking on links
- Verifying button visibility
- Checking element text content
- Working with multiple elements
- Filling form fields
- Submitting forms and verifying results
- Clearing and refilling input fields
- Making GET requests
- Verifying response status and headers
- Handling JSON response data
- Taking full page screenshots
- Capturing specific element screenshots
- Verifying element states
Feel free to explore and modify these tests to learn more about Playwright!