Forum Discussion
We believe we have found the solution. The issue appears to have been twofold: IE8 & IE9 opened the alert window in a new process, so our alias to iexplore didn't find the proper process, and the caption for the window was different in IE6 than it was in IE8/9. The following code appears to resolve both problems:
var caption
if (getBrowserVersion() == 6) {
caption = "Microsoft Internet Explorer";
} else if (getBrowserVersion() == 8) {
vcaption = "Message from webpage";
}
var dlg = Sys.Find(["WndClass", "WndCaption"], ["#32770", caption], 10);
Delay(500);
var btn = dlg.Find(["WndClass", "WndCaption"], ["Button", "OK"], 5);
btn.Click();
Where getBrowserVersion is defined as:
// The purpose of this function is to determine the version of the browser
// to be used when opening up a dialog box.
// Valid return values will be either 6, 8 or 9. 0 will be returned for an unidentified version
function getBrowserVersion()
{
var verstring = aqString.substring(Aliases.iexplore.FileVersionInfo, 0, 1);
if (verstring == "9") {
return 9;
} else if (verstring == "8") {
return 8;
}
else if (verstring == "6") {
return 6;
}
else {
return 0;
}
Thanks for your help,
Ron L
Related Content
- 11 years ago
Recent Discussions
- 16 minutes ago
- 58 minutes ago