var text = browserObj.ClosePopup("popup_text", "button");
popup_text
specifies the text pattern of the IE popup window to be found. * and ? wildcards are accepted in the text pattern.button
specifies the button to press; it is the button text or the button zero-based index order.var core = new ActiveXObject("OpenTwebst.Core");
var browser = core.StartBrowser("http://www.codecentrix.com/tests/testPopups.htm");
// Use hardware events otherwise Click will be blocked until the popup is close!
core.useHardwareInputEvents = true;
browser.FindElement("input button", "text=Alert").Click();
browser.ClosePopup("Alert text", "OK");