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 the previous video, we learned the implementation ObjectRepo forStudentDashboard of the page objects in test automation course. In this video, we will go through the Fixing the StudentLoginPage of the course.
Fixing the Student Login Page
Just go ahead and further implement the rest of the page objects so that you can further cement all of the knowledge that you’ve acquired here. So I’m going to go back to our aerialist and just proceed through the rest of the pages. So I’m going to come over here and again the student login page is complaining that the base page needs a value for its generic type. So utilizing my ID I’m going to pass that in. And now we need to create our object repository. So the naming convention is student log in page object repository. Of course the compiler is going to complain that the students login page object repository does not exist. So let’s implement it again using my ID I’m going to create a type student object repository over here on the left-hand side. That’s going to bring me down here and this type is a class. That’s right. And then, of course, the compiler is complaining that we need a parameterless constructor. So again using the idea I’m going to select to implement the missing members that missing members are implemented are classes happy the compiler is happy. Let’s move this to its own file. Again this moving to its own file is thanks to ReSharper not the Visual Studio ID. I don’t believe that you can do this in Visual Studio id e to move it to its own file. OK next.
Now that we have a concrete type testing for the generic page object repository we need to initialize it through our base page class and so now we’re just going to initialize the new student log in page object repository and past it. The driver that it requires And so now that’s initialized and everything is satisfied. All that’s left to do is to extract the elements so that they live in the appropriate class where they cannot affect the student logon page. So I’m going to take these gun and navigate to the student logon page object repository. I’m going to paste these elements there. They’re not going to be private they should be public awesome. So now that they’re public of course the compiler complains that it doesn’t have a reference for all of these variables so we need to give it a reference all of these variables by allowing you to access through the object repository.
Fantastic. Our class is now ready as well. Again utilizing logic repository we don’t need to know what elements are accessible to the student logon page. All we need to know is that we have an object repository and we can access all of the elements through that object repository. The variable that lives inside of the base Bache class