Page 1 of 1

Wait For Not Exists & Validate (NotExists) failure

Posted: Wed Jan 15, 2014 2:15 pm
by odklizec
Hi,

New day, new issue ;) OK, my new problem is like this. I have a recording, which closes the application then starts the Wait For Not Exists action with 5000ms timeout. And after this action, there is started Validate "NotExists" action.

The application is closed and Wait For Not Exists is almost immediatelly finished (in less than 2 sec.), so the application must really be terminated/not existing, right? The thing is, that Validate "NotExists" action sometimes fails with "Element for item 'Repository.AppName.Self' does exist." error.
WaitForNotExists.png
Why the Wait For Not Exists is terminated before the timeout is reached and the application probably still exists? How this could happen?

I tried to turn the Turbo playback OFF, but this did not help. The only thing that helped was adding a forced Delay before the Validate step, but I would like to avoid that.

This recording worked fine but all of suddenly, it started to act like this. Could it be something wrong in 4.1.4? Does the Wait For Not Exists action use a different kind of element existence detection than Validate "NotExists" action?

Unfortunately, I don't have a demo to share. I'm only able to reproduce it after loading and unloading number of proprietary files, which takes about 15 minutes to complete the test. Our nightly test loads even greater number of these files and the test takes about 2 hours to complete. And as I said, exactly the same test worked fine before.

Re: Wait For Not Exists & Validate (NotExists) failure

Posted: Fri Jan 17, 2014 4:43 pm
by rprehm
Hello odklizec,

Unfortunately this is not the expected behavior of the WaitForNotExists respectively Validate.NotExists. We are not able to reproduce the issue on our side.
Can you please add a snapshots action before and after the WaitForNotExists in in order to analyze the problem?
Report_Snaphot.png
Please send the Snapshot files as well as the Report files to: [email protected]
Thank you very much for your efforts and your cooperation!

Regards,
Robert

Re: Wait For Not Exists & Validate (NotExists) failure

Posted: Fri Jan 17, 2014 10:55 pm
by Support Team
An addendum to the post from Robert:
"Wait For Not Exists" uses the absolute path to search for the element, whereas "Validate NotExists" uses the repository structure including cached folder elements.

In other words: WaitForNotExists could return successfully (meaning the item is not found) if e.g. the (absolute) RanoreXPath checks for the window title and the window title is not the same any more. However, the Validate.NotExists could still find the element (and consequently fail) if the window element is cached from previous actions on the item.

Have you tried disabling caching ("Use Cache") of the app/rooted folder?

Regards,
Alex
Ranorex Team

Re: Wait For Not Exists & Validate (NotExists) failure

Posted: Mon Jan 20, 2014 9:31 am
by odklizec
Hi Robert and Alex,

Thanks for your suggestions. I will try both of them and let you know the result. It's definitely a weird behavior.