I use Selenium (standalone version) for testing websites. I used the ChromeDriver, but I tested it also with the FirefoxDriver.
My Problem: I get a java.net.SocketTimeoutException, by calling websites on first time, if they load very slow. It seems, that selenium dont want to wait, until the website built completely. If I run the application again, it works sometimes, because the website loads faster (caching maybe).
After searching on Google I found ways to set the timeouts, but it doesn't work:
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.manage().timeouts().setScriptTimeout(60, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
What can I do, that Selenium will wait for slower websites directly? I hope somebody can help me with this problem.