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 Explicit waits quiz answer of the Implicit and Explicit Waits course.

Selenium Tutorial – Implicit and Explicit Waits Explicit waits quiz answer

So what I did was I ran all of the tests and in here in the trades that right line I inserted the name of each of the methods so that it’s pretty clear how long it took for each element to be identified. So let’s see how you did which one of these methods would have been the slowest. So if you look at the test to explore we can see that we have four pass tests OK. And then if we move over each one we can see the elapsed time. But this is the elapsed time of the test not actually element identification. So if you look here. 17 seconds 11 and town and we look at this 17 second one and we go inside of the outport we can see that the time elapsed for Element identification was 10 seconds ok and if we go back to our Web drive driver waits class explicit waits. This is the one that uses the threat that sleep of 10000 milliseconds and therefore it is the slowest. Which makes sense right because all of our other ones. Check out this output 5.3 seconds. Check this out. At 5.2 seconds. And the first one 5.3 seconds are almost pretty similar because they are explicit wait  that dynamically pull. However this one is a hard coded explicit waits that will sleep for ten thousand milliseconds no matter what. Therefore even though the pages loading faster it still has to wait for those 10000 seconds. Therefore no matter what happens no matter how fast the application is this test will always run in a minimum of 17 seconds.

It may be you know a plus or minus a few seconds depending if it’s faster but it will minimally wait for 10000 milliseconds and then all the other actions will occur after that. For the other times they will obviously happen faster because as soon as the element is located the tests will proceed forward. And so that’s why this guy is the slowest. And that’s why I strongly recommend that you use explicit waits with expected conditions like in these cases. And if you find the need to use this constructor go ahead and use it. But for most of you probably this constructor will do just fine and you’ll be able to look at your elements using these kinds of statements.

Pin It on Pinterest

Share This