var text = browserObj.ClosePopup("popup_text", "button");
popup_text
specifies the text of the IE popup window to be found. This parameter is affected by useRegExp propertybutton
specifies the button to press; it is the button text or the button zero-based index order.var core = new ActiveXObject("Twebst.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");