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 how to use relative Xpath to identify an element in Selenium of the Elements Identification course.
Selenium Tutorial – How to Use Relative Xpath to Identify an Element in Selenium
So a relative path is nice because it is a much cleaner way to identify elements and it is more stable. So the beauty of that is you usually identify the elements once using relative X path and then you don’t have to worry about that element again changing locations depending on how you identify. But it’s a very nice thing to have because you wouldn’t have to worry about the element changing positions and so on and so forth with it’s nice relative ex-pat. It will be very stable similar to a relative an absolute folder paths if any of you are familiar with those. Right, an absolute folder paths gives you the exact location of the file a relative folder path gives you the location of the file relative to something else. Right, you may be in one folder and will say go up to folders and then go inside this other folder rather than always being located on the same on the full absolute path.
The only problem with relative X path is that it takes more time to find the correct identifier using relative techniques. But after we’re done with this lesson you guys are going to be so amazing that you guys won’t mind doing it. And so a relative ex-pat might look something like this. So if I want for example there’s Bawden rather than doing all of this I’m going to remove all that right so it would be something like this so that if I hit enter it highlights this button that I want. And if I want to button one I can button one. You guys see that. Compare that to the absolute max.
And you can right away see what’s much cleaner and easier to use. Not only that it’s much easier to understand where this is pointing to the right as opposed to something like this like Where the hell is this element. Point to I have no idea. So relative XPath is where we’re going to spend the most of our time focusing and really mastering this skill and once we’re mastered with XPath identification you guys will be so good. And at the top of your game ready to identify any elements any time using any tool especially with solanine web driver.