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 of using Selenium Webdriver for element identification of the Elements Identification course.

Selenium Tutorial – Using Selenium Webdriver for Element Identification


OK so next thing that I want you guys to do is open IDE so that we can just play around with it a little bit. And I want to show you guys something cool. So to get your selenium ID all you have to do is go to developer and then you will have that selenium ID button which you can also get to with all control us so I’m going to click that you guys see this opens and I’m going to put my web page on the side and my selenium IDE on the side as well so they’re equal partners in this relationship.

But actually, want selenium I need to be a little bit smaller. There’s a little bit bigger. So what you can see right now is anybody’s recording and that’s OK so what I’m going to do with it is I’m going to click on this button and you guys can see that right away. I got some code in the selenium ID. Let me stop recording. Go back here and look back on this page. So so Lenny M-ID is a nice theoretical tool used to create automated tests. Right. People use it to pay to record and playback because it’s so easy. But in the long term it is not maintainable at all. Don’t ever think of using it and if you’re taking my course and you’re using this tool I’m going to be very angry and mean you will have a serious chat. But the reason I like selenium ID is it kind of gives you a good introduction to how to identify elements with selenium web driver.

So for example I can come over here to the commands and I can open the Saab and I can see a bunch of commands that selenium ID has.

So if I want to do something like a highlight I can click highlight and then if I do the find. Sorry if I do right click and then execute command. It should highlight go up that and highlight click X to highlight. There it is. OK.

So X you guys see highlighting in bright yellow on the right side this button. That’s awesome right. And you guys can see that using this highlight command and this target which is ID equals ID example. I am able to highlight this element and there’s many other commands which obviously translate well into selecting and web driver but those aren’t important. The other cool thing here is this reference which obviously tells you how a command works.

And then there’s also a log that helps you to understand what it’s doing. So if I’m selecting this line and then looking at the log and then I click X logs the fact that I was highlighting an ideal example and if it fails it comes out to the log as well. Now if we want to change the element that we want to click on and you can click the select button and for example let’s try this one. You guys see how it’s selecting and it popped up. This target value for us to locate our elements. So that’s why so MIT can be cool sometimes because it can help you identify an element and show you how to identify it. In fact there are many different ways to identify this single element. In this case it’s UCSF You can also use Xpath Xpath and Xpath in all of these cases so for example let me leave this. And then if I do X on this command it should highlight that button. You guys see that it did do it again see that.

But if I changed to another identifier like this it should also be able to do that by hitting the bottom. I can see that it’s highlighting that element. So what does this showing you is a few of the possible ways that selenium can use to identify an element and even further it’s showing you some hints as to the values that you can use with selenium web driver.

Nikolay Advolodkin is a self-driven SDET on a lifelong mission to create profound change in the IT world and ultimately leave a legacy for his loved ones, community, and the world at large. Today, he serves as the CEO and Test Automation Instructor at UltimateQA.com and contributes informative articles to leading test automaton websites like SimpleProgrammer.com and TechBeacon.com

Pin It on Pinterest

Share This