LambdaTest Community

Find answers, support, and inspiration from other users

Questions
LambdaTest Community
Answered

What is Selenium Waits? Why do we need it?

What are the type of Selenium Waits and how we can use them?

Up Vote Down Vote 0 Votes
Posted 5 months ago

Answers


Well, waits in selenium is an essential piece of code that is required to execute a test case.Selenium waits for page load play an important part in your Selenium scripts. They help to make them less flaky and more reliable. Selenium provides multiple waits to provide adequate wait or pause in your script execution based on certain conditions.

Thereby ensuring you don’t end up getting failed scripts as you perform automation testing with Selenium

Majority of modern application’s front-end is built on JavaScript or Ajax, using frameworks such as React, Angular, or any other which takes a certain time for the web elements to load on the page, whenever that page is loaded or refreshed. Hence, in case you tend to locate an element in your script which is yet to load on the page, selenium will throw you ‘ElementNotVisibleException’ message.

Up Vote Down Vote 0 Votes
Posted 5 months ago