Hi 👋🏽!
Welcome to the course "Advanced Playwright" by Renata Andrade for the Test Automation University. If you are new to Playwright, I invite you to a look at the Introduction to Playwright course.
- Playwright v1.35.1
- Node v20.3.0
- npm v9.6.5
- VSCode Version: 1.79.1 (Universal)
- Applitools v1.17.5
Pre requirements:
- Copy the project URL
https://github.com/raptatinha/tau-advanced-playwright.git
; - Fork the project following the GitHub instructions - (use the parameter --clone=true);
- Access the forked project
cd tau-advanced-playwright
NOTE: Remember to add the secrets & variables to your local repo.
IMPORTANT: Create your .env file following the .env.example. The APPLITOOLS_API_KEY
is the only param you'll need to uptdate to your credentials.
On your terminal, type:
npm i
Take a look at the package.json - scripts for more details. The tests are using https://demoqa.com/
npm run test-ui-c
runs all tests on chromium (except the auth)npm run test-ui-auth-admin
runs profile-stored-auth-multi-role-admin.spec.tsnpm run test-ui-auth-user
runs profile-stored-auth-multi-role-user.spec.tsnpm run test-ui-auth
runs profile-stored-auth-multi-role-example.spec.ts (test will fail due to application limitations)npm run test-vrt
runs visual-regression.spec.ts - visual regression testing with applitools
- Regular authentication with page objects;
- Stored authentication with global-setup via UI;
- Stored authentication for multi users;
- Advanced - auth via API request;
- Hooks file for reusable page object creation
- URL builder for dynamic url creation
- Fixtures file for reusable flows
- The APIRequestContext
- HTTP methods, request options, request URL
- How to identify an API call and use the swagger
- Execute request dynamic
- Error handling
- Reusability
- Via .env files
- Via JSON
- Via API
- Via mock data
- Via CSV - https://playwright.dev/docs/test-parameterize#create-tests-via-a-csv-file
- Implementing a visual regression test
- Using different check settings
- Interpreting the results
- Github Actions
- The yml file
- Slack Integration
- Parallelization strategy & Sharding
💡 Share on LinkedIn something interesting you've learned! Don't forget to tag me Renata Andrade.
💜 If you have questions, feel free to post them on github.
Happy Testing 🎭