I want need a void check a xpath and return true or false and dont wait time out. Check one time, if exist return true and if dont exist return false immediately - dont wait time out. Please help me if you have any idea.
Thanks you so much!
I want need a void check a xpath and return true or false
-
- Posts: 1
- Joined: Mon Jun 27, 2016 5:04 am
Re: I want need a void check a xpath and return true or false
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:
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?
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))
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration