Hi,
I'm not quite sure what exactly you want to achieve, but if you just want to quickly test the availability of an element without throwing an exception and don't want to wait entire Effective Timeout, you can use for example TryFindSingle method:
Code: Select all
String MyPath ="/form[@title='Calculator']/element[@class='CalcFrame']";
Ranorex.Unknown myElement = null;
if (! Host.Local.TryFindSingle(MyPath, 5000, out myElement))
The above code tests the availability (returns true/false) of an element for given xpath, with 5sec timeout. If the element is found, it's returned to myElement. Hope this helps?