Not waiting long enough for Not Exists

Ask general questions here.
dochoa
Posts: 29
Joined: Tue Jul 16, 2013 11:36 pm

Not waiting long enough for Not Exists

Post by dochoa » Tue Dec 16, 2014 9:08 pm

Hello,

I have a test suite running with a timeout factor of .5, I do not want to change this.
One of my recording has a Wait for Not Exists with a timeout of 5 minutes on a repository item that has the search timeout also set to 5 minutes.
Why is my test failing because it only waits 2344ms for the object to not exist?
How do I fix this without changing the timeout factor of my test suite?

Thank you

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

Re: Not waiting long enough for Not Exists

Post by krstcs » Tue Dec 16, 2014 10:29 pm

I would HIGHLY recommend setting the timeout factor back to 1.0 if you are having timing issues. The test won't run any faster by setting it lower, it will only fail faster. Timeout values ONLY determine the MAX time Ranorex will wait before it FAILS to find an item, not how fast Ranorex will find the item. Changing the timeout factor can also make if very difficult to find timing issues because Ranorex will not wait long enough for elements to exist before it fails.

Timeouts are designed to tell the system when to stop looking for something if it hasn't found it. Making them shorter means the system doesn't have as long to look. Depending on the XPath and the structure of the application, Ranorex may need longer than 10s, or even 30s, which is the default. Making the timeout longer won't make the test any longer, it will just allow Ranorex more time to find the item, if it can.

For example, if Ranorex is going to take 20s to find an item, no matter what you do, then changing the timeout to 10s is going to make Ranorex fail, even though the system works just fine, while leaving the timeout at 30s will still take only 20s to find the item, not 30. So, unless there is a timing requirement that says the element must be found in 10s, you should only ever make the timeout BIGGER, not smaller, than the 30s default.

Also, are you sure that the item's search timeout is '5m' and not '5s'? It is easy to change it to something where Ranorex substitutes 'ms' and you delete the wrong letter.
Shortcuts usually aren't...