How to make Ranorex wait for loading another control.

Class library usage, coding and language questions.
SAM_001
Posts: 2
Joined: Mon Nov 10, 2014 1:40 pm

How to make Ranorex wait for loading another control.

Post by SAM_001 » Mon Nov 10, 2014 2:07 pm

Take the scenario, I have drop-down list in my web application to select the country name. On selecting the country name, relevant province will be loaded to the next drop-down.

But the problem I am facing with Ranorex, when playing back my scripts, ranorex is not waiting for controls to load. For e.g. when I select a country, it takes some time (few seconds) to load the "province" drop-down. But Ranorex not waiting for this few seconds which causing my tests to fail.

I can add some delay / wait for control statement to resolve it. But its tedious to do so for each and every case. Do you have some simple solution for this ? Thank you.

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

Re: How to make Ranorex wait for loading another control.

Post by odklizec » Mon Nov 10, 2014 2:42 pm

Hi,

Probably the easiest way to wait for an element is to add Wait For action, with parameter Exists. See this page in Ranorex User Guide, with description of available types of actions...
http://www.ranorex.com/support/user-gui ... tions.html
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

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

Re: How to make Ranorex wait for loading another control.

Post by krstcs » Mon Nov 10, 2014 3:25 pm

As odklizec said, use the WaitFor.Exist() action/method.

Remember, Ranorex will go as fast as it possible can. You need to make sure the timing is correct. As a human user, we automatically wait for things to load. You have to tell Ranorex to do that.


One other thing you might do is add "and @visible='true'" to your RanoreXPath. This will force Ranorex to not find the element until it is actually visible. You could also try "@enabled='true'".
Shortcuts usually aren't...