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 quiz answer to large page objects of the page objects in test automation course.
Selenium Tutorial – Page Objects in Test Automation Quiz answer to large page objects
So hopefully that wasn’t too bad for you you’ve gotten practice with pretty much everything except abstracting out the actual little sections into their own classes. But the Rush should have been pretty easy for you if not it’s OK. You just need to practice more and that’s why I have the quizzes for you to be able to further improve your skills.
So let me show you what I did here. Of course I have data that test to use the center content. Let me show you my center content property returns me a new center content page my center content page has a center content page object repository that’s going to contain all of the elements related to the center content which is the toggle. So of course you have to truck out all the elements from the complicated page object repository into this page object repository making your complicated page object a repository smaller and cleaner and then of course my center content page has the standard methods for interacting with the toggle.
And then if we go back to the method there we’re using both of the methods that we had created before and they’re just going through the center content page nothing with change you just have to extract out everything into the appropriate page. And now you can see how small our complicated page class-A is with went from about 60 lines to about 25 lines of code and we’re utilizing composition by having all of the appropriate properties living inside of our complicated page class.
And now everything is easier to access in our tests because we just go to the complicated page and then based on that we access the appropriate section and then through that section we interact with the appropriate elements making our tests more readable. Our classes smaller and easier to maintain and of course let me run this test for you just to make sure that it passes and for you if you just had different naming conventions of course that’s OK. You don’t have to have the exact same naming conventions as me but I hope that the actual architecture of the classes and the creation of all object repositories in the elements was the same.
The only thing that could have differed for you was the naming conventions that you had for your properties and classes but there they should be pretty similar to mine as we were following pretty standard conventions throughout this entire course. Fantastic. So you saw that the test passed and with that we are done cleaning up our complicated page objects making them smaller more readable and easier to maintain. Congratulations you have succeeded in achieving an entirely higher level of automated software testing with Page objects