This project is read-only.

How to wait for a window and using regex

Oct 18, 2010 at 11:01 AM

Hello People,

          I am facing problem in using regex and waiting till the window appears. 

After I login, the window which throws up has the title format as - "ApplicationName version - ServerIP". I wanted to use only the "ApplicationName". 

Application myApp = Application.AttachOrLaunch(Path);

Window mainWindow = myApp.GetWindow(new RegEx("ApplicationName*"));

The Above like is giving the problem saying that the arguments are invalid. 

I was also suppose to wait till this window shows up. I was trying "WaitTill". Could anyone please throw some light on the same. 



Oct 18, 2010 at 11:32 AM


this can't work



Window main = myApp.GetWindows().Where(p=>p.Title.Contains(ApplicationName)).First();



Oct 18, 2010 at 1:09 PM

Cool :) It works. Thanks. 

I am now able to get on to this window.

But, for me to wait till this window pops up, how can I get hold of the window object as we are using GetWindows() method.

Cos, when I run this line of code, the login screen is still loading our app :(