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 how do you clean up large page objects of the page objects in test automation course.
Selenium Tutorial – Page Objects in Test Automation How do you clean up large page objects
I’m going to start cleaning up test three here and decreasing the size of our classes again.
I’m going to code all of this lie for you just follow along and then I’ll explain what I did after.
Awesome. So I’ve cleaned it up. If you take a look at the test you can see that what I started doing was utilizing touch human development. I wrote what I wanted to happen first. So we’re doing complicated page dot social media section which is going to take us to our social media section as we discussed and the social media section you can imagine it as an entirely different page that that’s going to manage all of the stuff related to the social media section and social media section. It’s just a simple property that returns a social media page right just like any other pages we were to a social media page and actually let me clean it up. I can make this easier. Utilizing C# notation I can make those very nice and clean as such. So nice and clean right.
Anyway so that’s what that means I was a Getter that returns a new social media page and the social media page takes a driver just like all of our pages. And of course the social media page in here is from a base page and here you have an option. You can either create a new page object repository just for the social media page or you can reuse the parents page object repository. I actually recommend that you create your own page object repository for each object just to be consistent.
But for time purposes I reused the complicated page object repository page and it’s actually really easy if at any time your complicated page object repository gets really big which is going to in the case of this page you can easily just replace it with your new page object repository that you create for the social media page or for any page for that matter. But again for the purposes of speed I just reuse the complicated page object repository. And of course everything else is exactly the same as for any other page. Let’s run this test to make sure that it actually works.