I know this question has been answered before but none of the solutions seem to work for me.I have been on this for an entire day.I have tried all of the below:
1)wait(1000);
2)driver.manage().timeouts().implicitlyWait(1000, TimeUnit.SECONDS);
3)driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
Also, when I am executing my code on debug mode (Debug as JUnit Test to be more precise) then I am supposed to see the wait right ?
I am trying this with Chromedriver 32 bit and IEDriver 32 bit.I am using Eclipse IDE.
The main reason I am trying to make the driver wait is because the snapshots are being captured before the page has completely loaded.
Any help would be hugely appreciated.Thanks!
EDIT :
As it turns out the problem is not that the driver isn't waiting.I get an error : "Element is not clickable at point (457, 261). Other element would receive the click" I tried looking it up Debugging "Element is not clickable at point" error but there is no solution in java.
CODE :
driver.findElement(By.id("appInfoRestartBtn")).click(); capturescreenshot("C:\\webreceiver\\Screenshots\\Desktops\\Desktops3.jpg");
//driver.findElement(By.cssSelector("div.messageBoxCancelAction > a.dialog.button")).sendKeys("");
element = driver.findElement(By.cssSelector("div.messageBoxCancelAction > a.dialog.button"));
Actions action = new Actions(driver);
action.moveToElement(element).click().perform();
driver.findElement(By.cssSelector("div.messageBoxCancelAction > a.dialog.button")).click();
driver.findElement(By.id("appInfoAddButton")).click(); capturescreenshot("C:\\webreceiver\\Screenshots\\Desktops\\Desktops4.jpg");
StackTrace :
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (457, 261). Other element would receive the click: <a href="#" class="messagebox overlay" id="genericMessageBoxOverlay" style="display: inline;"></a>
(Session info: chrome=43.0.2357.81) (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.3 x86_64) (WARNING: The server did not provide any stacktrace information)