Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
When performing automation testing with Selenium, we can use different types of Waits:
Thread.Sleep() Method: The Thread.Sleep() method, which belongs to the thread class and can be called using a reference of the class name, i.e., Thread, can be used while performing automation testing with Selenium. This method will stop the execution of the script for the specified duration of time, irrespective of whether an element is found on a web page. It accepts a time duration in milliseconds.
Implicit Wait: With Implicit Wait, Selenium has overcome the problems of Thread.Sleep(). Implicit Wait allows you to pause the WebDriver for a particular time until it can locate a desired element on the selected web page.
Explicit Wait: The Explicit Wait is one of Selenium's dynamic waits. It lets you pause the execution of your script until an element is visible on a web page. If the specified amount of time passes without the element appearing, you will get an ElementNotVisibleException.
Fluent Wait: In terms of its functionality, the Fluent Wait is similar to Explicit Wait. While you perform a Selenium Wait for an element when you are unaware of the time it may take to be visible or clickable, you use a Fluent Wait when you know how long the element will be visible.
Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud