In this video series for Selenium Interview questions, I will try my best to provide in-depth insights into the Selenium concepts.
1. Why do we need Waits in Selenium?
Waits are very much important in Selenium automation. Without Waits, our tests won't work as expected. There are several reasons for any exceptions related to the web element. It could be the delay in loading the elements or there may not be any element with the locator provided and so on. In all these conditions, wait enables us to perform our operations effectively without breaking the tests.
2. Wait options available for Selenium:
Thread.sleep(), Implicit wait, Explicit wait and Fluent wait
3. What is Fluent Wait?
It is a type of Selenium waits which allows us to command the web driver to wait until several defined conditions are met before performing an action on the web element and also it allows the option to ignore the exceptions, define the polling frequency as well during the wait time.
4. Why use Selenium Waits over thread.sleep()?
Thread.sleep() reduces the performance of the code to a greater extent and it's not recommended.
#Selenium #InterviewQuestions #FluentWait #LearnAutomationOnline