In This Course
Did you know that a recent poll revealed that 80% of QA Automation Engineers cannot run more than 100 functional tests daily, with 95% reliability? Furthermore, over 50% of these Automation Engineers struggle to run between 0 – 50 automated functional tests per day!
Functional test automation is a hard job. However, you can make your job much easier by learning a pattern known as the Page Object Pattern. The Page Object Pattern helps to resolve a lot of the problems that other automation techniques cannot. Making your test automation more stable as a result.
This course is designed to teach you how to properly code the Page Object Pattern using Selenium Webdriver with C#.
However, all of the information here is equally applicable to any other functional testing tool because the Page Object Pattern is a universal principle that makes test automation more robust. Similar to other universal concepts such as Don’t Repeat Yourself or Single Responsibility Principle.
Therefore, if you know Object Oriented programming and a different functional automation tool, you can still comfortably follow along with all of the principles and patterns that I lay out in this course.
In this course, you will learn:
– Why other methods such as Record & Replay or Keyword Driven do not work when it comes to test automation
– What the Page Object Pattern is in automation
– Advantages and disadvantages of the Page Objects
– Amazing tips and tricks on how to:
- Implement the Page Objects using Selenium Webdriver
- Improve your Page Objects to follow DRY Principle
- Improve Page Objects to follow SRP Principle
- Create amazing Page Objects for gigantic web pages
In This Lecture
In the previous video, we learned the first look at a functional test using the page object model of the page objects in test automation course. In this video, we are going to introduce the page object pattern for the course.
Introduction to the page object pattern
So the page object pattern What is it exactly. Well if you deconstruct its name it is actually a really beautiful name that literally implies what we must do in order to utilize page objects over on the left-hand side you can see an actual HTML page. And over on the right-hand side what you’re you can see is my page dots. Yes, class and this class whenever it’s instantiated it’s obviously going to be instantiated in the form of an object.
So whenever you’re writing your class what you’re going to do is you’re going to take the HVM male page and encapsulated inside of your page class so that whenever you’re interacting with the page you’re using that object to interact with the HVM Mel page. That’s how beautiful this pattern is.
The page object pattern so literally what’s happening at the end of the day is that you are utilizing your page classes to interact with Charmel page just as you would interact with it manually. So if you think of an HMO page like this one in front of you in the actions that you might take it as a manual test or as any user those same actions you would perform utilizing the page object pattern and your code.
So for example, if you want to click the Start here button you just call the click Start here but method if you want to navigate to the video tutorials you use the page that go to video tutorials. It’s as simple as that and your tests begin to look beautiful.