-
Install node.js (u will get
npmby default) -
install vscode
-
create project folder open in vscode
-
install latest playwright version ---
npm init playwright@latestchoose the language u want to use -
folder structure: - package.json -- node project management file playwright.config.js -- playwright configuration tests -- all the playwright tests
-
Playwright uses webSocket(WS) protocol to interact with server while selenium/appium uses http protocol
-
To run all the test under tests folder
npx playwright test -
To run specific test file
npx playwright test HomePageTest.spec.js
-
To run all the test under tests folder
npx playwright test --project=chromium -
To run specific test file
npx playwright test HomePageTest.spec.js --project=chromium
npx playwright test HomePageTest.spec.js --project=chromium --headed
npx playwright test HomePageTest.spec.js --project=chromium --headed --debug
npx playwright codegen
check npx playwright codegen -help for all the available option