Implicit wait:
The implicit wait will tell to the web driver to wait for a certain amount of time before it throws a "No Such Element Exception". The default setting is 0. Once we set the time, the web driver will wait for that time before throwing an exception.
driver.manage().timeouts().implicitlyWait(TimeOut, TimeUnit.SECONDS);
The explicit wait is used to tell the Web Driver to wait for certain conditions (Expected Conditions) or the maximum time exceeded before throwing an "ElementNotVisibleException" exception.
Explicit wait :
The explicit wait is an intelligent kind of wait, but it can be applied only for specified elements. The explicit wait gives better options than that of an implicit wait as it will wait for dynamically loaded Ajax elements.
Once we declare explicit wait we have to use "ExpectedCondtions" or we can configure how frequently we want to check the condition using Fluent Wait. These days while implementing we are using Thread.Sleep() generally it is not recommended to use
WebDriverWait wait = new WebDriverWait(WebDriverRefrence,TimeOut);
If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium training!