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

Setting Up Environment For Selenium Webdriver
1. Installation of Selenium IDE: i. Launch Firefox and navigate to https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/ . Click on Add to firefox. ii. Wait until Firefox completes the download...

Facebook Analytics
Assume how the Facebook application will store the millions of customer's record in real-time: facebook = { 'jose': { 'name': 'jose', 'age': 33, 'hobby': , # cricket,football 'mobile': 1111111111, 'email':...

Explicit Wait in Web-Driver
The Explicit Wait is used to tell the Web Driver to wait for certain conditions (Expected Conditions) The explicit wait is an intelligent kind of wait and applied on a particular element Explicit wait...

How Motivation Affects Learning and Behavior
Motivation directs behavior toward particular goals. Motivation leads to increased effort and energy. Motivation increases the amount of effort and energy that learners expend in activities directly...

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
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