How to give the default wait time at the global level in Ranorex

Ask general questions here.
premravi
Posts: 95
Joined: Tue Jan 08, 2019 1:55 pm

How to give the default wait time at the global level in Ranorex

Post by premravi » Mon Oct 21, 2019 3:59 pm

Hi,

I am looking for a method, property or setting in Ranorex which applies wait of certain duration globally, means at every step - "default wait", what we call "implicit wait" in selenium (Just for comparison I am taking selenium reference)

I hope I made my requirement clear

Please help me to resolve the issue

Regards

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

Re: How to give the default wait time at the global level in Ranorex

Post by odklizec » Tue Oct 22, 2019 8:02 am

Hi,

I'm afraid, that there is no such a thing like "global wait time" in Ranorex. In Ranorex, we have a repository, where are stored all UI elements used by recording and code module actions.

Each repository element have a Search timeout, which is, by default 30s. This value is configurable in Settings, but only for newly added repo elements. Which means, this setting does not affect existing repo elements. And here I agree, that it would be nice to have an option to set the Search timeout globally, for all existing elements. Currently, the Search timeout could be set only manually, one element after another. I think it's for purpose, to discourage people from modifying Search timeout with some absurd values, like 0s, 1s or so ;) And to be quite honest, during all the years, I'm working with Ranorex, I changed the Search timeout maybe for 10 elements? Definitely not for more :D

Another important timeout, is called Effective timeout, which is a sum of Search timeouts of all ancestors of given element. This timeout is automatically calculated and the only way how to change it, is to re-arange elements in repo, or to change the Search timeouts of all ancestor elements. So for example, DOM element have both Search and Effective timeout 30s, because it's a top level element. But any 1st level element under DOM, have Search timeout 30s and Effective timeout 1m (30s for DOM + 30s for 1st level element). And so on. The same apply if element is stored in a rooted folder (another 30s for each rooted folder level). The only exception is Simple folder, which Search timeout is by default set to 0ms.

I think the best you can do, is to forget about Selenium, or the way it handles the UI elements and learn how to effectively use Ranorex repository and 'Wait for' actions. There is really no need of customer configurable global wait time, because this is what Ranorex actually does for you. It waits for an element its entire Effective timeout and you can always use 'Wait for' actions to further enhance your tests at particular places.
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