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 Writing the first functional test for the large page of the page objects in test automation course.
Selenium Tutorial – Page Objects in Test Automation Writing the first functional test for the large page
Let’s go ahead and code out two quick tests and then I’ll work through with you on organizing those tests and cleaning up all the page objects so that they are smaller and more readable. So I got my ID here let me pull up the web page on the right hand side so that we can look at it while we do some coding. So bear with me as I just coded it this out and then I’ll explain everything after. As always I’m going to start by writing the test using test driven development methodology and then we will do the implementation. So for the first test I’m thinking of just clicking on one of these buttons and making sure that it goes to the appropriate page. So let me write that test.
OK. So here is the skeleton of the first test. What I’ve done is obviously created a new instance of the complicated page we navigate to the page and then I have a validation point where I check that the complicated page has opened successfully. Afterwards I’m going to click the first Twitter button and over here I was struggling a little bit trying to decide what should I do should I validate that we’ve successfully navigated to the Twitter page. And then I thought about and said no that’s not really necessary because the Twitter page is none of our concern here and I don’t want to take you guys down a different path. So rather than doing that what I’ve done is asserted that the complicated pages that method returns false. So meaning that we have actually left the complicated page and we are adding a new page and that should be sufficient enough to tell us that the Twitter button was successfully clicked.
Now let’s go ahead and actually implement all of the code