I just read that new Watir version (3.1.0) has “support for Alert API”. What can I actually do with this API?
Is it meant for dealing with javascript popup windows? If so, what command can I use to click “OK” in popup window? Or how can I read title & text of popup window?
I tried “browser.alert.ok” after updating Watir to 3.1.0 but just got some error message…
(There is not yet any clear documentation about this, and trying to interpret the source code is not my strongest side…)
Alert API is for dealing with JavaScript popups.
browser.alert.okshould work. Could you provide the error message?I am not sure about getting popup title, but you can get it’s text with
browser.alert.textMore information: http://watir.github.io/docs/javascript-dialogs/