I'm currently trying to execute a JavaScript popup using the webdriver HtmlUnitDriver and this is creating a weird outcome.
The same line of code works fine with FirefoxDriver , but as soon as it switches to HtmlUnitDriver, it stops working. The simple code I use is here:
Alert alert = driver.switchTo().alert(); alert.accept();
Is HtmlUnitDriver capable of handling Java pop-ups, or is it an HtmlUnitDriver bounding point.
this is a Javascript Confirm popup. We tried to use firefox properties using HTMLUnitDriver by doing the following:
driver = new HtmlUnitDriver(BrowserVersion.FIREFOX_3);
It was not successful.
The question is, should JavaScript for HTMLUnitDriver be enabled to interact with the Confirm popup? If YES, does anyone know how we can enable this?
driver = new HtmlUnitDriver(capabilities);
does not seem to work and is not recognized.
Any help would be greatly appreciated. Greetings
source share