public void SampleMethod() { IntPtr hwndTmp = (IntPtr)FindWindow("#32770", "Dialog Title"); WatiN.Core.Native.Windows.Window popUpDialog = new Window(hwndTmp); dialogHandler.HandleDialog(popUpDialog); // // The line above will find the OK button for you and click on it, // from here you continue with the rest of your code. }
public bool HandleDialog(Window window) { return(alertHandler.HandleDialog(window) || confirmHandler.HandleDialog(window)); }