Why isn't it possible (using the InternetExplorerDriver
) to accept alerts which have been triggered by explicitly executing JavaScript?
driver.ExecuteJavaScript("myfuncTriggeringAnAlert()");
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5));
var alert = wait.Until(ExpectedConditions.AlertIsPresent());
alert.Accept();
The code works great using ChromeDriver
, unfortunately however, the InternetExplorerDriver
does not even return from the ExecuteJavaScript()
call. It simply times out after 60 seconds.
Any ideas? Is this well-known behavior?
IE11 + IE Driver 2.48.0