ElementRepository.CreateAdapterForPath - timeout not working
Posted: Wed Nov 12, 2008 5:54 pm
Guys, what do I do wrong?
I need some time to load the application before accessing it's element, so I was expecting the _timeout setting to do the waiting job, but it throws an exception immediately after it hasn't found the element.
maybe there's any other way to wait until the application to be automated is loaded, or the element to be automated is created?
i'm trying to use Ranorex 2.0, but I'm really new in it and there's documentation...
I need some time to load the application before accessing it's element, so I was expecting the _timeout setting to do the waiting job, but it throws an exception immediately after it hasn't found the element.
maybe there's any other way to wait until the application to be automated is loaded, or the element to be automated is created?
i'm trying to use Ranorex 2.0, but I'm really new in it and there's documentation...
Code: Select all
public static Ranorex.Element myElement
{
get
{
try
{
return ElementRepository.CreateAdapterForPath<Ranorex.Element>("/element[@controlname='myElement']", 5000);
}
catch
{
throw new RanorexException("The item named 'myElement' in repository 'myRepository' was not found.");
}
}
}