public static Window firstWindow(this API_GuiAutomation guiAutomation)
        {
            guiAutomation.sleep(100);                           // needed on install wizards that change windows quite quickly
            var windows = guiAutomation.windows();

            if (windows.size() > 0)
            {
                return(windows[0]);
            }
            return(null);
        }
 public static Window window(this API_GuiAutomation guiAutomation, string windowName)
 {
     if (guiAutomation.notNull())
     {
         foreach (var window in guiAutomation.windows())
         {
             if (window.Name == windowName)
             {
                 return(window);
             }
         }
     }
     return(null);
 }