Using explicit wait / implicit wait is best practice. Let's check that there is actually an explicit wait, Thread.sleep (), Implicit wait working logic
Explicit Expectation: Explicit Expectation is a kind of expectation of some condition before continuing with the code.
Implicit expectation: Implicit expectation means that WebDriver must poll the DOM for some time, trying to find the element or elements if they are not immediately available. Default value: 0
Thread.sleep () In the sleep code, it will always wait for the mentioned seconds in parentheses even if the work page is ready in 1 second. Thus, it can slow down the tests.
source share