Playwright adalah framework open-source buatan Microsoft untuk otomatisasi browser (browser automation) dan pengujian ujung-ke-ujung (end-to-end testing) pada aplikasi web modern.

Log Installlation
C:\Dev\PlayWright>npm init playwright@latest
Need to install the following packages:
create-playwright@1.17.139
Ok to proceed? (y) y
> npx
> create-playwright
Getting started with writing end-to-end tests with Playwright:
Initializing project in '.'
√ Do you want to use TypeScript or JavaScript? · TypeScript
√ Where to put your end-to-end tests? · tests
√ Add a GitHub Actions workflow? (Y/n) · false
√ Install Playwright browsers (can be done manually via 'npx playwright install')? (Y/n) · true
Initializing NPM project (npm init -y)…
Wrote to C:\Dev\PlayWright\package.json:
{
"name": "playwright",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Installing Playwright Test (npm install --save-dev @playwright/test)…
added 3 packages, and audited 4 packages in 3s
found 0 vulnerabilities
Installing Types (npm install --save-dev @types/node)…
added 2 packages, and audited 6 packages in 1s
found 0 vulnerabilities
Writing playwright.config.ts.
Writing tests\example.spec.ts.
Writing package.json.
Downloading browsers (npx playwright install)…
Downloading Chrome for Testing 156.0.8078.4 (playwright chromium v1248) from https://cdn.playwright.dev/builds/cft/156.0.8078.4/win64/chrome-win64.zip
197.5 MiB [====================] 100% 0.0s
Chrome for Testing 156.0.8078.4 (playwright chromium v1248) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\chromium-1248
Downloading Chrome Headless Shell 156.0.8078.4 (playwright chromium-headless-shell v1248) from https://cdn.playwright.dev/builds/cft/156.0.8078.4/win64/chrome-headless-shell-win64.zip
118.1 MiB [====================] 100% 0.0s
Chrome Headless Shell 156.0.8078.4 (playwright chromium-headless-shell v1248) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\chromium_headless_shell-1248
Downloading Firefox 157.0 (playwright firefox v1555) from https://cdn.playwright.dev/dbazure/download/playwright/builds/firefox/1555/firefox-win64.zip
123.8 MiB [====================] 100% 0.0s
Firefox 157.0 (playwright firefox v1555) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\firefox-1555
Downloading WebKit 27.2 (playwright webkit v2370) from https://cdn.playwright.dev/dbazure/download/playwright/builds/webkit/2370/webkit-win64.zip
60.2 MiB [====================] 100% 0.0s
WebKit 27.2 (playwright webkit v2370) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\webkit-2370
Downloading FFmpeg (playwright ffmpeg v1013) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1013/ffmpeg-win64.zip
1.6 MiB [====================] 100% 0.0s
FFmpeg (playwright ffmpeg v1013) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\ffmpeg-1013
Downloading Winldd (playwright winldd v1007) from https://cdn.playwright.dev/dbazure/download/playwright/builds/winldd/1007/winldd-win64.zip
0.1 MiB [====================] 100% 0.0s
Winldd (playwright winldd v1007) downloaded to C:\Users\muamr\AppData\Local\ms-playwright\winldd-1007
✔ Success! Created a Playwright Test project at C:\Dev\PlayWright
Inside that directory, you can run several commands:
npx playwright test
Runs the end-to-end tests.
npx playwright test --ui
Starts the interactive UI mode.
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.ts - Example end-to-end test
- .\playwright.config.ts - Playwright Test configuration
Visit https://playwright.dev/docs/intro for more information. ✨
Happy hacking! 🎭
npm notice
npm notice New major version of npm available! 10.9.3 -> 12.2.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.2
npm notice To update run: npm install -g npm@12.2.2
npm notice
Running 6 tests using 4 workers
6 passed (10.9s)
To open last HTML report run:
npx playwright show-report
C:\Dev\PlayWright>npx playwright test --ui