1.5m Wait for Exists action failing after 5 seconds?

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 333
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

1.5m Wait for Exists action failing after 5 seconds?

Post by Fergal » Mon Dec 09, 2019 5:01 pm

Ranorex 9.2.1

I have a repository item, with an effective timeout of 5 seconds. I have a Wait for Exists test step for that item, with a timeout of 1.5m. Sometimes that wait for exists step fails, with the following two consecutive log items in the report:
Waiting 1.5m to exist. Associated repository item: '[Repo item name]'
Failed to wait for item to exist.
Invocation did not finish within the timeout of '00:00:05'.
Is there any reason why the timeout is taken from the effective timeout of the repo item (i.e. 5 secs) and NOT from the Timeout time (i.e. 1.5m) in the Wait for Exists step?

Thanks

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6037
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: 1.5m Wait for Exists action failing after 5 seconds?

Post by odklizec » Tue Dec 10, 2019 7:42 am

Hi,

I just tried to simulate your problem with Notepad (waiting 1.5m for Notepad form, with 5s effective timeout) and Ranorex waited whole 1.5m before giving up with "element not found" message. So, in my opinion, your problem is somehow AUT/solution/system specific? Unfortunately, without seeing the AUT, exact repo configuration and test suite, it's impossible to tell what's wrong? In my opinion, the timeout 5s is way too low and from the error message you posted, the Wait for Exists did not even initialized within this timeout? But the 1M $ question is why? ;) What kind of application and technology are we talking about (desktop, web, mobile)? And have you tried to add the app process to the Ranorex whitelist?
Pavel Kudrys
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

Fergal
Certified Professional
Certified Professional
Posts: 333
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: 1.5m Wait for Exists action failing after 5 seconds?

Post by Fergal » Tue Dec 10, 2019 10:21 am

Thanks very much odklizec. The test is still failing in 5 seconds, even when I increase the effective timeout of the repo item to 10 secs.

It's a WPF desktop app.
have you tried to add the app process to the Ranorex whitelist?
Not yet, the solution is not using any white listing but will look at that.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6037
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: 1.5m Wait for Exists action failing after 5 seconds?

Post by odklizec » Tue Dec 10, 2019 10:33 am

Hi,

Well, as I mentioned, it's impossible to tell what's wrong without examining the app and test suite. I would suggest to contact Ranorex support and request a remote session.

I think that you will have to increase the Search/Effective Timeout even a bit more for this specific element? Just for the sake of test, increase the timeout to 1m.

BTW, reducing Search/Effective timeout should be done only in a very specific situations and only for elements, for which you know for sure they will appear within the specified timeout. It's really better to keep the Search timeouts untouched ;)
Pavel Kudrys
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

Fergal
Certified Professional
Certified Professional
Posts: 333
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: 1.5m Wait for Exists action failing after 5 seconds?

Post by Fergal » Wed Dec 11, 2019 1:47 pm

Thanks very much odklizec.
odklizec wrote:
Tue Dec 10, 2019 10:33 am
...BTW, reducing Search/Effective timeout should be done only in a very specific situations and only for elements, for which you know for sure they will appear within the specified timeout. It's really better to keep the Search timeouts untouched ;)
Reducing timeouts is something I do quite a bit so will definitely bear your tip in mind for future tests. The reason I reduced the timeout for this particular element, is that it is a parent for other elements, that sometimes don't exist and have "enable continue on fail" steps run on them. I reduced the timeout on the parent element, to give more control of the effective timeouts on the child elements and hence speed up test runs.

I have worked around this issue by placing a delay before the wait for exists step. Not my preferred method but it is working successfully in this instance.

Thanks again for all your help.