browser.ClosePopup("*", "Leave this page");
browser.ClosePopup("", "Leave this page");
browser.ClosePopup("Are you sure you want to leve this page?","Leave this page");
I have set core.asyncHtmlEvents = true; and core.asynHtmlEvent = false; I've also tried it with useHardwareInputEvents set to true and set to false. Any help would be greatly appreciated.
Thanks,
Shawn
Adrian,
I appreciate you looking into this.
Thanks, Shawn
[DllImport("user32.dll")]
public static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
private static void CloseDialog()
{
var handle = FindWindow(null, "Give your window caption/title here");
SetForegroundWindow(handle);
//send alt+f4 using sendkeys method
System.Windows.Forms.SendKeys.SendWait("%{F4}");
}
Thanks, Jagath