https://github.com/ericzon/playwright-walkthrough
https://github.com/ericzon/playwright-walkthrough
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ericzon/playwright-walkthrough
- Owner: ericzon
- Created: 2022-12-31T07:59:27.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-31T07:59:58.000Z (about 3 years ago)
- Last Synced: 2025-01-23T22:17:45.135Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Intro
Just a quick walkthrough to start using Playwright. I was made for me but glad if it was also useful for you.
## How to begin
Run this command in your empty project folder and follow the steps:
```
npm init playwright@latest
```
### Output message after install
Inside that directory, you can run several commands:
```
npx playwright test
```
Runs the end-to-end tests.
```
npx playwright test --project=chromium
```
Runs the tests only on Desktop Chrome.
```
npx playwright test example
```
Runs the tests in a specific file.
```
npx playwright test --debug
```
Runs the tests in debug mode.
```
npx playwright codegen
```
Auto generate tests with Codegen.
We suggest that you begin by typing:
```
npx playwright test
```
And check out the following files:
- ./tests/example.spec.js - Example end-to-end test
- ./tests-examples/demo-todo-app.spec.js - Demo Todo App end-to-end tests
- ./playwright.config.js - Playwright Test configuration
Visit https://playwright.dev/docs/intro for more information
## How to start debugging
To open a browser during the tests & see the real-time execution:
```
export PWDEBUG=console
```
To open Playwrigth Inspector:
```js
await page.pause();
```