Open GoogleCodeExporter opened 9 years ago
Please provide also a sample page for this sample scenario.
Original comment by barancev
on 19 Aug 2014 at 9:05
I attache a simple html file.
Original comment by para.sel...@gmail.com
on 19 Aug 2014 at 5:54
Attachments:
What chromedriver version do you use?
I couldn't reproduce the issue with chromedriver 2.10 and chrome 36:
WebDriver driver = new ChromeDriver();
driver.get("http://fiddle.jshell.net/barancev/oL0go930/show/light/");
for (int i = 0; i < 100; ++i) {
WebDriverWait waitForElement = new WebDriverWait(driver, 10);
waitForElement.until(ExpectedConditions.presenceOfElementLocated(By.id("alertButton"))).click();;
WebDriverWait waitForDialog = new WebDriverWait(driver, 20);
waitForDialog.until(ExpectedConditions.alertIsPresent()); // exception thrown here
driver.switchTo().alert().accept();
}
driver.quit();
Original comment by barancev
on 21 Aug 2014 at 8:14
I am using the same version of chrome driver 2.10
This problem is happening on my machine constantly, but in other machines I can
not reproduce this issue I tested it on two other machines with same platform,
although execution is going slower and slower on each iteration.
And as a workaround I am using some additional thing that I can not understand,
if I run
((JavascriptExecutor) driver).executeScript("");
while I waiting an alert dialog, the test will pass without throwing any
exception, and the execution will be more faster. I tested it by decreasing the
wait time to 5 seconds and no problem.
So maybe this will give you some idea what is going there.
for (int i = 0; i < 100; ++i) {
...
waitForElement.until(ExpectedConditions.presenceOfElementLocated(By.id("alertButton"))).click();
((JavascriptExecutor) driver).executeScript("");
WebDriverWait waitForDialog = new WebDriverWait(driver, 5);
...
}
Original comment by para.sel...@gmail.com
on 26 Aug 2014 at 8:41
Original comment by samu...@chromium.org
on 21 Feb 2015 at 12:41
Original issue reported on code.google.com by
para.sel...@gmail.com
on 19 Aug 2014 at 1:35