Ranorex ... too fast?

Ask general questions here.
User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Ranorex ... too fast?

Post by giuseppe.lacagnina » Tue Dec 22, 2015 3:35 pm

Hi everyone.

I am running:
- Ranorex Studio 5.4.4.26486
- Windows 7 64 bit
- testing HTML applications with IE

Sometimes my test cases fail "randomly": it is like Ranorex is literally "going too fast" and "getting confused": not waiting for actions to be completed and so on. I know this is not clear, but it is bothering me quite a lot and I need a way to figure this out.

What I mean is that when I run the test cases from the Studio, everything is fine; however, when I run directly the compiled executables from the command prompt, the whole test seems to go quite faster. There is often something going wrong, where everything was right when running from the Studio.

Is anyone aware of these issues or is having them himself? I would greatly appreciate any help. Unfortunately I need to automate my tests and cannot run them all from the Studio.

Thanks in advance!

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

Re: Ranorex ... too fast?

Post by krstcs » Tue Dec 22, 2015 5:40 pm

I HIGHLY recommend adding WaitFor.Exists() or WaitFor.NotExists() to your tests before each action to make sure that the element is actually there, or that a previous element no longer exists.

Also, you can add " and @state='complete'" to your top-level /dom object like this:

/dom[@domain='www.mydomain.com' and @state='complete']

This will force Ranorex to ONLY find the web page if the page has loaded fully.
Shortcuts usually aren't...

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: Ranorex ... too fast?

Post by giuseppe.lacagnina » Wed Dec 23, 2015 11:23 am

I am using the wait functions already, but the tip to check for the complete status sounds very good. I will definitely try it. Thanks!!!

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Ranorex ... too fast?

Post by Aracknid » Mon Jan 04, 2016 8:47 pm

Yes, I have issues with speed. But That's a good thing. I'd rather it was fast and I have to write better (smarter) code to handle this, than it was too slow. :D

Mostly I test in IE, but I've run into this even more when I started testing on FireFox and then Chrome. Chrome seems to be much faster and I had to add more checks for UI elements to be visible or simply add delays of a second or 2 just to slow it down in certain functions I wrote.

Aracknid.