// retry count will be deprecating
        public static void ExpectMessageBoxWillPopUp(string title, string expContent, Action messageBoxTrigger,
                                                     string buttonNameToClick = null, int retryCount = 5, int waitTime = 5000)
        {
            IntPtr msgBoxHandle = WindowWatcher.Push(title, messageBoxTrigger, waitTime);

            AssertMessageboxContent(msgBoxHandle, retryCount, expContent);
            CloseMessageBox(msgBoxHandle, buttonNameToClick);
        }
        public static IMarshalWindow WaitAndPush <T>(this IWindowStackManager windowStackManager,
                                                     Action action, string name, int timeout = 5000)
            where T : DispatcherObject
        {
            IntPtr         handle = WindowWatcher.Push(name, action, timeout);
            IMarshalWindow window = windowStackManager.Push(handle);

            Assert.IsNotNull(window);
            Assert.IsTrue(window.IsType <T>());
            Assert.IsTrue(name == null || name == window.Title);
            return(window);
        }
 public static void ExpectMessageBoxWillNotPopUp(string title, string expContent, Action messageBoxTrigger,
                                                 string buttonNameToClick = null, int retryCount = 5, int waitTime = 5000)
 {
     try
     {
         IntPtr msgBoxHandle = WindowWatcher.Push(title, messageBoxTrigger, waitTime);
         CloseMessageBox(msgBoxHandle, buttonNameToClick);
     }
     catch (AssertFailedException)
     {
         // discard error since it is reversed
         return;
     }
     Assert.Fail("Message box should not open.");
 }