The Selenium Reference documentation says “Selenium does NOT support JavaScript alerts that are generated in a page’s onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.”
But how life goes – I happen to have an application that uses onload dialogs. I know of the “browserbot” workaround for previous versions but none of this works anymore for Selenium Webdrivers…
Has anybody tackled this one already?
WebDriver, if you can. It does not suffer from this limitation. If you useWebDriver, thendriver.switchTo().alert()should work as usual.SendKeysclass for the same thing.