enable continue on fail

Ask general questions here.
strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

enable continue on fail

Post by strannik » Mon Nov 03, 2014 5:33 pm

Hi All,

Is it possible to change time for Enable continue on fail settings when Ranorex is looking for an item?

For an example in my case it is 1m or 1.5m. I need to decrease time that script will run faster.

Thank you.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: enable continue on fail

Post by krstcs » Mon Nov 03, 2014 6:23 pm

The time that Ranorex takes to find an item is based on the Search Timeout of the item and it's parent item(s). It is called the "Effective Timeout" and in order to change it you must change the timeout of the element and all of it's parent objects in the repository.

BUT---
Changing the search timeouts will NOT speed up your test run significantly, it will only make it FAIL faster because you aren't giving Ranorex sufficient time to find objects. You cannot make Ranorex go faster and still expect it to be accurate. It must be given time to find (or NOT find) objects. Remember that the search timeout is only the MAXIMUM time that Ranorex will wait before it fails, not the minimum.

If you are expecting an object to not be found, then there are better ways to handle it than using "Continue on Fail" and manipulating the timeouts so it fails faster. Continue On Fail should be used only when you don't care if an action fails, and it will still wait for the full timeout before it fails due to not finding on object.

You could use WaitFor.NotExist() (or WaitFor.Exist()). It will wait until either the specified timeout is reached (and throw a failure) or the item is not present (or present).
Shortcuts usually aren't...

strannik
Posts: 60
Joined: Tue Apr 29, 2014 3:00 pm

Re: enable continue on fail

Post by strannik » Mon Nov 03, 2014 8:37 pm

Thank you krstcs,

I need script to continue executing after it is not find the item that's why I was asking is it possible or not to change settings.