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

Commonly occurred exceptions you know in WebDriver
WebDriverException NoAlertPresentException NoSuchWindowException NoSuchElementException TimeoutException

How to Shape Your Software Testing Career?
When I met with the students they ask or can say its a frequently ask question "How much Scope of Testing is?" "What the pay package I will get?" "Is career secure in Software Testing?" "I will learn...

ListIterator Example
public class ListIteratorEx { public static void main(String args) { List<String> li = new ArrayList<String>(); li.add("java1"); li.add("java2"); li.add("java3"); li.add("java4"); ListIterator...
S

Sarthak C.

0 0
0

Write a script to open firefox without using firefox driver class?
Write a script to open firefox without using firefox driver class? Solution:Runtime.getRuntime().exec("C:\\Program Files\\Mozilla Firefox\\firefox.exe");

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