Record / Play back Stability

Ranorex Studio, Spy, Recorder, and Driver.
Derek
Posts: 5
Joined: Tue Oct 18, 2011 10:57 pm

Record / Play back Stability

Post by Derek » Tue Oct 18, 2011 11:09 pm

Hi all,

I have recorded user actions on my website using Ranorex Studio which refers to an external csv file for variable values. there are 5 records in my CSV file so the playback macro will loop 5 times.

This has worked perfectly for a few runs but watching it just now It seemed to have a problem on the forth loop, Ranorex seemed to miss two mouse clicks and was searching for something on screen that wasn't yet there. :(

I was hoping to run this macro on a much larger csv file with 100's or more records. could Ranorex ever be stable enough for this or would it never be reliable enough?

Would adding a validate between each step work better?, is it possible to do a IF fail to validate then try again function? because I couldn't find it.

thanks
Derek

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

Re: Record / Play back Stability

Post by Ciege » Wed Oct 19, 2011 3:34 pm

You need to add verifications that objects are available and the AUT is ready before you continue to a step that interacts with an object. If the AUT is still loading from the last step and the object does not yet exists, then you will run into problems. Your test scripts need to be more robust to be able to deal with situations like this, especially once you start moving tests to different machines.
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...

Derek
Posts: 5
Joined: Tue Oct 18, 2011 10:57 pm

Re: Record / Play back Stability

Post by Derek » Thu Oct 20, 2011 1:12 am

thanks Ciege, I appreciate your time.

I might be missing some steps (or training :) ) but after adding validation on each step if the website is a little too slow the script aborts having failed validation on objects not yet loaded. Where as when I have no validation the script will just wait for the object to load and if it doesn't appear in 1minute the test will abort.

what I really want is to wait up to 1 minute for an object to appear then if its not there re-attempt the previous step then look for the object again.

cheers
Derek

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

Re: Record / Play back Stability

Post by Ciege » Thu Oct 20, 2011 3:51 pm

Well, I don't use the recorder so I'm not sure of your solution there, but if you switch to user code this is easy. Add a check for object in a try/catch block then catch the exception that occurs... If your count is < some number you can loop that check until you find the object.
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...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Record / Play back Stability

Post by Support Team » Thu Oct 20, 2011 3:56 pm

Hi,
Derek wrote:what I really want is to wait up to 1 minute for an object to appear then if its not there re-attempt the previous step then look for the object again.
You could solve this with a code part in your recording or you use user code. For example you search for an element with TryFindSingle and if its not found search again.
Inside the action table of the recording it is currently not possible to trigger a repeat to search again for the element. It is also not possible to call a test case recursively.

Regards,
Peter
Ranorex Team

Derek
Posts: 5
Joined: Tue Oct 18, 2011 10:57 pm

Re: Record / Play back Stability

Post by Derek » Thu Oct 20, 2011 9:00 pm

thanks again guys, I've managed to satisfy my immediate need to loop a repetitive web task using the quick and dirty recorder :)

I realise that for anything more serious Im going to need to get into the coding side, I might try and pick apart the code behind what Ive recorded and improve it that way.

thanks heaps
Derek