About this question
I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever I feel it takes more time to load. But still some 5-6 testCases failed. How can I make my selenium wait until the page loads ?? And what would the below code do ? driver.manage().timeouts().implicitlyWait(4000, TimeUnit.SECONDS); Will it wait for 4 seconds every time or it sets the maximum time limit to 4 secs .