Try using implicitlyWait for 60 seconds. as stated in Selenium WebDriver:
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);//wait for 60 sec.
If you need to wait yet, do it 80, 90, etc.
For Selenium RC, you can use the code as shown below:
selenium.waitForPageToLoad("60000");//wait for 60 sec.
This can be done using Thread, as shown below:
Thread.sleep(NUMBER_OF_MILLIS);
To wait explicitly in WebDriver, identify the item on the download page and write the code as shown below:
WebDriverWait wait = new WebDriverWait(driver, 40);//wait for 40 sec. WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
source share