scripts working on one machine are not working on another

Ask general questions here.
rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

scripts working on one machine are not working on another

Post by rkarhe » Wed Aug 24, 2011 6:17 pm

Hi All,

I found scripts working on one machine are not working on another having same configuration. Somewhere I have to add sleep time or some other workaround. Could you please suggest what could be the problem.

Is there any alternative for FindSingle(looks FindSingle is very slow).?
Is TryFinddSingle alternative for Validatee.Exists()?

Thanks,
Rocky

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

Re: scripts working on one machine are not working on another

Post by Ciege » Wed Aug 24, 2011 6:32 pm

What kind of issues are you getting on the second machine?

You mention needing to add a sleep time to your script for the second machine. That is indicative of timing issues... Either the second machine is slower or configured differently to cause your AUT to run slower...

Rather than adding hard coded sleep timers you should add verification code to verify the AUT is ready or an element exists before continuing with a step. With proper verifications set up you can move your test code to any speed of machine and the automation will wait accordingly for your AUT to be ready before executing a step.
Is there any alternative for FindSingle(looks FindSingle is very slow).?
It is only slow depending on the complexity of your AUT and where you root your find from. In other words, if you are trying to find a cell in a grid with thousands of items and that grid is buried within many frames and your find is rooted at the top of your AUT, the find will indeed take much time since it has to traverse your AUT. If however, you root your find at the grid element itself, your find will take less time. This is just an example, but the methodology is sound for all different types of element you wish to find within your AUT.
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...

rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

Re: scripts working on one machine are not working on another

Post by rkarhe » Sat Aug 27, 2011 6:16 pm

Thanks for the reply, it really helps me to resolve the performance issue. Could you please have a look on my post at http://www.ranorex.com/forum/dom-vs-for ... t2559.html.

In short this post tells that, when compairing dom vs form based object identification I found dom has better performance. Is that true?

Thanks,
Rocky

rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

Re: scripts working on one machine are not working on another

Post by rkarhe » Sat Sep 03, 2011 6:20 am

Ciege wrote:What kind of issues are you getting on the second machine?

You mention needing to add a sleep time to your script for the second machine. That is indicative of timing issues... Either the second machine is slower or configured differently to cause your AUT to run slower...

Rather than adding hard coded sleep timers you should add verification code to verify the AUT is ready or an element exists before continuing with a step. With proper verifications set up you can move your test code to any speed of machine and the automation will wait accordingly for your AUT to be ready before executing a step.).
You mean I will add wait for object to load before working on it. Is there any ranorex method which will check object loaded or not or I need to use Validate.Exists for this.

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

Re: scripts working on one machine are not working on another

Post by Ciege » Tue Sep 06, 2011 6:45 pm

rkarhe wrote:You mean I will add wait for object to load before working on it. Is there any ranorex method which will check object loaded or not or I need to use Validate.Exists for this.
Is your AUT web base or winforms?
If web based, check the readystate of the DOM for complete to know that your AUT has completed loading and is ready for testing...

If winforms, do you have any status bar or similar user facing information that lets the user know something is occurring in the AUT? If so, watch that for readiness... If not, check for objects to exist before interacting with them.
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...