Confusing problem

Ask general questions here.
MikeP
Posts: 2
Joined: Thu Nov 11, 2010 3:18 am

Confusing problem

Post by MikeP » Thu Nov 11, 2010 3:41 am

Hi there, I'm a new Ranorex user and I've just run into a problem that I hope people can help with.
I'm testing an application that we have developed.
I have created several recordings and run them from a central controlling form.
The 1st one starts the application - and runs fine.
The 2nd one searches for a particular record - and runs fine.
The 3rd one modifies & saves the record searched for in the previous test - and runs fine.
The 4th one searches for a non-existent record, checks that it doesn't exist and then adds it. This one runs fine.
The 5th one modifies the record created previously and adds a child record. This also works fine.

Here's where the fun begins.
The 6th one is supposed to delete the child record created previously. To do this it clicks a button to show the child record, then clicks another button to delete it.
When I run this recording stand-alone from within Ranorex Studio it works fine.
When I run it as part of the overall suite of tests from the form, it fails.
Instead of clicking the button to reveal the child record, it clicks - somewhere else. The "somewhere else" appears to be a bit random, but it is rarely even on the application I'm testing. Most often it seems to be the top left of the desktop.

I have found a work-around, but it's a bit manky and I'd prefer not to have to do it, so any assistance from anyone who has seen something similar would be greatly appreciated. I'm a bit concerned because I don't know why it's happening. This means that it could fail in the future for the same unknown reason and I'll have to do the same sort of cludge fix.
The work-around is to close down the application and re-start it just before the step that fails (using Ranorex Recordings of course ;)).


Thanks in advance.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Confusing problem

Post by Support Team » Thu Nov 11, 2010 11:23 am

Hi,

Have you tried to compare the RxPath of the recording and the Spy after this problem occurs? Maybe there is a difference in the RxPath, because the recording before affect your software in a different way and therefore after executing the batch of recording this RxPath changes.
You can also disable the caching setting for the corresponding element. Therefore please take a look to following documentation http://www.ranorex.com/support/user-gui ... html#c2076

Regards,
Peter
Ranorex Team
.
Image

MikeP
Posts: 2
Joined: Thu Nov 11, 2010 3:18 am

Re: Confusing problem

Post by MikeP » Thu Nov 11, 2010 9:43 pm

Thanks for your reply. As I said, I'm a brand new user so I'm still getting to grips with this, but it looks to me like the paths are the same.
In the repository, the path appears as:
button[@automationid='HeaderSite']
Absolute path:
/form[@name~'{customer/app name removed}']/container/container/container/button[@automationid='HeaderSite']

In Spy, just after the failure, the path appears as:
/form[@name~'{customer/app name removed}']/container/container/container/button[@automationid='HeaderSite']

If it was a path error wouldn't Ranorex just stop? It's actually clicking on something completely unrelated to the application I'm testing.

I don't know if it makes a difference, but I'm remote controlling a virtual machine. I have seen elsewhere that someone else had a problem with remote desktop, but it's a different problem to the one I'm having.


Edit: I tried disabling the cache but this didn't seem to make any difference.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Confusing problem

Post by Ciege » Thu Nov 11, 2010 10:01 pm

Does the button exist before step 5? You say step 5 adds the child record and step 6 clicks a button to delete the child record. So... does the button exist before step 5 or does it only exist once step 5 is completed?
If this is the case then quite possibly, the reason this succeeds on your "stand alone" test is that the button is in existence and everything is happy happy... And, the reason this fails in your suite is that step 5 has completed in test, but the AUT isn't finished doing what it needs to do and your step 6 has already started. It tries to click the button but it doesn't exist properly in your AUT yet so Ranorex is getting confused and clicking at 0,0.
Can you try adding some delay between steps 5 and 6 or better yet add some code that purposely waits for the button needing to be click in step 6 exists before you try to click it.

Side question, what type of AUT is this? Web based (IE?) or thick client like .NET etc...? If web based you can add a wait in code for the DOM readystate to become completed before continuing with your step 6.
Similarly, if not web based, you can create some code that checks for other points of interest to determine if the AUT is in a ready state before continuing with step 6.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...