UrbanPro
true

Learn Selenium from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Selenium waits

Pratibha T.
25/02/2022 0 0

In Selenium web driver, the biggest challenge is to synchronize your script with the Web application under test. To make this synchronization work, we have concept of waits. Although we can use Thread.sleep() which pauses your script for the specified milliseconds but it is not recommended to use as whether your requirement is fulfilled or not, it is definitely going to pause your script for the specified time. 

   Instead if we use waits we give a maximum timeout. For example, if we have given a maximum timeout of 20 seconds and our requirement gets fulfilled in just 2 seconds so remaining 18 seconds will be saved and it will continue with the next line of code. 

Mainly we have these types of waits:

1. Implicit wait

2. Explicit wait

3. Page load timeout

So it's always recommended to use waits instead of Thread.sleep() if your requirement is to wait for some web element to be visible, cllickable, element present or not, and so on. 

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

Black in Python
When you are upturn in your career from beginner to experienced in programming world, your team will start looking at ‘how you are writing?’ Here the responsibility piling up. Okay,...

Example of DependsOnMethod in TestNG
public class dependsonM { @Test public void login() { System.out.println("login"); } @Test (dependsOnMethods = {"login"}) public void email() { //Intentionally I am failing this testcase Assert.assertTrue(false);...
S

Sarthak C.

0 0
0

Free selenium video tutorial
Hi All, Hope you are doing good. We uploaded few videos on Selenium components like IDE, RC and Webdriver on youtube channel you can watch them for free of cost. Kindly search with below link: ...
S

doWhile example in Java
public class doWhilePracticleEx { public void test() { } public static void main(String args) { String q1 = "Who is PM of India?"; String a1 = "Sonia Gandhi"; String a2 = "Rahul Gandhi"; String a3...
S

Sarthak C.

0 0
0

Is Automation The Software Testing Miracle Cure?
The technology community is a big fan of automation. From DevOps’ continuous delivery roots to enterprises’ automatic business processes, automation is a trademark of the business world and...
X

Looking for Selenium Classes?

The best tutors for Selenium Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Selenium with the Best Tutors

The best Tutors for Selenium Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more