Page 1 of 1

scripts working on one machine are not working on another

Posted: Wed Aug 24, 2011 6:17 pm
by rkarhe
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

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

Posted: Wed Aug 24, 2011 6:32 pm
by Ciege
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.

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

Posted: Sat Aug 27, 2011 6:16 pm
by rkarhe
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

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

Posted: Sat Sep 03, 2011 6:20 am
by rkarhe
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.

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

Posted: Tue Sep 06, 2011 6:45 pm
by Ciege
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.