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

Take This Entire Course for Free

What will you learn in this lecture?

In this video, we will go through the process on how to identify link and icon using Xpath of the Elements Identification course.

Selenium Tutorial – How to Identify Link and Icon Using Xpath

 

Now let’s analyze a link. Let’s come over here and hover over this link and that what you can see right away as that fire path gives me this XPath which is pretty excellent because we have an ID and Id like I said is always the best because it means that the element is unique. So we can use selenium driver to do by DOT ID and just supply this value. That’s right there. You can also use our favorite contains text function. And again it’s not my favorite here because it’s too long for our purposes this as an ID might as well just use it. But if we wanted to we just put that in here and then we hit enter.

And you guys still identifies the link and then obviously you can do by X path and just passing the exact string that our original fire path query displayed which is this. And looking at all of these again you can see that the more simple one is ID. So you just do by DOT ID and then you just supply the value like that and that’s it. You don’t have to try to figure out an X path B got an ID take it. Next let’s talk about an icon. Have you guys worked with icons before. If you have and you’ve had trouble now you will learn how to do it. So looking at this clickable icon this is the initial pad that is given to me. So I’ll put that here. What else can we do here. Well we see this has a class. Right. So let’s try using the class.

So how do we do that. Remember class has an attribute. So if we get rid of all this and we don’t care what tag it is that’s why there is that star there. But we do care that it’s a class and that it has a value of this guy. And then we hit enter and it still maintains. The question is does anything else have a class like this in here. I don’t think so. And so we can do that use this. And obviously you can do that by class name. And then just pass in the value. And again that is what I would probably use just because it’s the most simple and you don’t really have to do too much extra work.

Pin It on Pinterest

Shares
Share This