Page Object Model with Playwright and Typescript
In most of the companies, count of test cases in automation are very high. To maintain these tests is very difficult. Also, sometimes little change in UI may affect many tests and we need to change at multiple places. Page object model also known as POM in short is a design pattern which solves above issues and make framework organised. It helps to reduce duplicate code, increase readability and reusability. So if you are writing playwright automation professionally it is very important to use Page Object Model.
In playwright, if you follow the guideline from beginning then implementing Page Object Model is very easy. I have created a YouTube video in the "software testing tips and tricks" channel where I have explained How to implement Page Object Model with Playwright and Typescript with Live coding.
In this video, we will learn,
1. what is the Page Object Model
2. Benefits of Page Object Model
3. How to implement the Page Object Model with playwright and typescript?- Step by step.
4. if any drawbacks
5. Conclusion
Watch All playwright tutorial videos from the beginning
For live example, I have automated Amazon Product Order workflow, where we figured out what to automate, automation steps and then implemented using Page Object Model.
Here is the official Playwright document for the page object model.
All Playwright Tutorial Posts -
- Setup NodeJS playwright and run the first script
- Learn basic automation with Playwright - with code
- Expect and Auto-waits in Playwright
- How to debug the playwright script?
- How to compare screenshots using Playwright?
- Best Practices with Playwright automation
- Playwright Tutorial - Handle Multiple Tabs with Playwright
- automate downloads using Playwright?
- Automate file upload using Playwright
- Different types of waits in the Playwright Automate REST APIs using Playwright and Typescript - explained with live coding
No comments