- course https://jaktestowac.pl/course/playwright-wprowadzenie/
- test site https://demo-bank.vercel.app/
- code repository https://github.com/mikroTesting/Automation-training
- check
NodeJSversion
node -v - new project with Playwright
npm init playwright@latest - record tests for given site
npx playwright codegen https://demo-bank.vercel.app/ - run tests without browser GUI
npx playwright test - run tests with browser GUI
npx playwright test --headed - view report
npx playwright show-report - cancelling Node process
hit twice Ctrl + C
- config file
playwright.config.ts - disable browsers, i.e. Firefox
// { // name: 'firefox', // use: { ...devices['Desktop Firefox'] }, // }, // { // name: 'webkit', // use: { ...devices['Desktop Safari'] }, // }
- Preview: for README.md
- Autosave: in File -> Auto Save
- Timeline: file context menu -> Open Timeline
- Formatting: editor -> context menu -> Format Document
- test:
test('test description', async ({ page }) => { });
- describe:
describe('Group description', () => { });
- running one test:
test.only