What will you learn in this course?
Are you struggling with working with HTML using Selenium WebDriver? Do you know how to easily identify and manipulate an element using Selenium WebDriver? How about performing a drag n’ drop on an element? If not, then these are just a few of the questions that will be answered in this course.
This course is a complete guide on working with web elements in Selenium WebDriver! Once you are finished with this course, you will know how to work with any web elements, anytime, on any web application.
In this course from Ultimate QA, you will learn:
– Basics of HTML
– All the different locator strategies for Selenium WebDriver
– How to identify web elements using Selenium WebDriver
– Master XPath
– Navigation with Selenium WebDriver
– Web element manipulation
– Web element interrogation
– Mouse and keyboard actions with Selenium WebDriver
– Performing actions such as drag n’ drop, drawing, hovering
– Implicit and Explicit waits
– How to properly handle element identification so that your tests are not flaky
– Expected Conditions in Selenium WebDriver
What will you learn in this lecture?
In this video, we will go through the analyzing the new CoursesPage of the page objects in test automation course.
Selenium Tutorial – Page Objects in Test Automation Analyzing the new CoursesPage
So take a look. With me at the Course’s page what I have done over here on the left-hand side is our old implementation of the Course page and on the right-hand side is the new implementation of the Course page the right-hand side of the Course’s page has removed our objects and stored them into an object repository. Now this has the benefit because our courses page now only deals with Page manipulation and our object repository is going to deal with object storage. If any of you are familiar with Q-tips This is the kind of similar paradigm that they used to implement with their object repository. They used to have all the objects live in an object repository. And then you utilized all of those objects inside of your script utilizing the object repository. So that’s the same thing that’s happening here. And thanks to the object repository we are now following the single responsibility principle because our courses page is only responsible for interacting with the page and not object storage.
So you can see that our class has become a little bit smaller because now we don’t need to store any elements like we do here on line 7. Also when we initialize the page we initialize it through a base page that gets created with a type of courses page object repository. Our constructor now creates our base page and along with the creation of the base page it creates a new instance of a causes page object repository. Finally, the other advantage that I believe this page object has is that now we have access to all of our objects related to this page using the object repository keyword.
So rather than knowing the name of something like assigning length, for example, all we have to do is type in Object repository poorish the period and then that’s going to allow us to see all of the objects inside of the object repository related to this page. Now that maybe a little bit confusing so let’s go ahead and step through the code so that I can better show you exactly what’s going on here