Page 1 of 1

Wait for a specific window to appear

Posted: Tue Dec 03, 2013 9:25 am
by chris31
Hi

I've just started with Ranorex and already have a small question. In my test the time between screens switching in my application is really machine / test setup dependent.
How can i wait for a specific window to appear ( with a timeout of course ) before running the rest of my test ?

TIA

Christophe.

Re: Wait for a specific window to appear

Posted: Tue Dec 03, 2013 12:02 pm
by Swisside
Hello

You can add a new usercode action and write those lines :

public void waitForWindow()
			
		{
			//Wait until the windows is enabled
			while(!repo.MyWindow.Self.Enabled){
			
				//do nothing
			}
			//When the windows is enabled continue the test
			
			Report.Info("Continue Test");
			
		}

Regards

Re: Wait for a specific window to appear

Posted: Tue Dec 03, 2013 2:04 pm
by bru
Another solution for this could be to increase the "Search Timeout" of the Repository Item your test script will have to wait for.

Right-click the repository item, select "Properties" in the context menu and set the property "Search Timeout".