From the course: Learning Playwright
Unlock this course with a free trial
Join today to access over 24,200 courses taught by industry experts.
Challenge: Create three automated tests
From the course: Learning Playwright
Challenge: Create three automated tests
- [Instructor] Now that we've covered a lot of the basics with Playwright test automation, now it's your turn to write some code. For this challenge, I want you to create an automated test that adds an item to the shopping cart, goes through the checkout process, and when paying, selects buy now, pay later. I also want you to create a visual test to the checkout flow to validate the final payment screen. And lastly, create an API test against the endpoint slash products slash unique ID, ensuring the correct product details are returned in the API response. I'll leave you with a few hints to help you get started. Back in video six, where we walked through setting up the storage state, this includes an authenticated user for one of the customers. Using this will save you a few steps in your test. Also, for the API test, the product IDs get automatically updated every two hours due to the database resetting. This is a practice test site. You'll need to find a way to reliably get the…
Contents
-
-
-
-
(Locked)
Overview of the website under test5m 3s
-
Generating tests with codegen4m 31s
-
(Locked)
Overview of locator strategies in Playwright5m 39s
-
(Locked)
Overview of assertions in Playwright12m 56s
-
Structuring Playwright tests9m 8s
-
(Locked)
Handling cookie authentication in Playwright12m 4s
-
(Locked)
Visual testing in Playwright10m 58s
-
(Locked)
API testing in Playwright13m 31s
-
(Locked)
Automating the right things with Playwright2m 24s
-
(Locked)
Challenge: Create three automated tests1m 29s
-
(Locked)
Solution: Create three automated tests10m 2s
-
(Locked)
-
-