Exemplo n.º 1
0
        public Window ExpectingPopup(string name)
        {
            Application.DoEvents();
            Window popup = this.WaitForPopup();
            string text  = Window.GetForegroundWindowText();

            if (text.ToLowerInvariant() != name.ToLowerInvariant())
            {
                throw new ApplicationException(string.Format("Expecting popup '{0}'", name));
            }
            return(popup);
        }