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 evaluate elements at run time of the Elements Identification course.

Selenium Tutorial – How to Evaluate Elements at Run Time

 

In this video I quickly want to cover an amazing technique that is going to drastically reduce the amount of time that you spend doing debugging in your automated functional tests.

So what I’m going to do here is pull up our Chrome browser utilizing solanine web driver. So I’m going to come here in my test to explore and actually I’m going to execute from here and I’m going to do debug. It’s going to go ahead and open this you RL Where we’re doing all our automation practicing.

So the problem that I’ve seen too many times with people is and it’s actually very frustrating is a lot of people actually don’t know how to debug in an efficient manner.

So what happens is usually we have this kind of test where we you know navigate to where you are now. Then we click some other maybe you are so close then we do some stuff we fill out do some actions you know fill out some forms proceed to next pages and do that for you know however long it takes for an automation test to happen.

The problem is what happens when you begin to run into errors.

For example a lot of times you’re going to have issues like dealing with elements you may identify an element in the browser correctly.

But when you go to place that into your code it doesn’t work for whatever reason.

A lot of times you will notice with X path for example but there are some certain conventions so when you stick in a string of X path into selenium web driver it won’t let you do it. I don’t know if I have any examples here but if you have any kinds of locators that look like this for example let me see here. So as some kind of a locator like this where there are spaces in X path the code will actually complain and say that you can’t have such an ID with a bunch of spaces so you’re actually going to need to break it up into XPath. So stuff like that.

You know the browser will recognize that because it’s valid in the browser but when you go to utilizers it with solanine but web drivers non-valid you got to run into errors. So the problem that I see is that many people what they do is when the code breaks they look at the error they put a break point like I did and then they’ll rerun the entire test and that can obviously be very time consuming. So for example if it takes 45 seconds to get to the location where you want it to get to. Now every time you need to deal with this air you’re going to spend 45 seconds and a lot of times I caught myself in the past doing this over and over especially with Element locaters because I would be sometimes the locator that I find just would not be stable enough. And so I would need to keep doing this and it was a huge waste of time.

So what I want to show you is what’s called this immediate window right here the media window you can actually get from Visual Studio by going through the bog windows immediate. Right there. OK. So once you get it out with this does it actually allows you to execute commands on the fly while code is paused. It’s really fantastic.

So for example let’s try to click on this link.

So here’s the link.

I’m going to actually click it using It’s a trap.

Pin It on Pinterest

Shares
Share This