Page 1 of 1

Script Execution Issues

Posted: Wed Sep 29, 2010 1:59 pm
by dal
Hi Team,

Here there are couple of issues observed:

1. I have 4 different VB File called from Main method.

There are times all 4 will run successfully one after another, at times 2 or 3 or someother randomly failed though all the precondition for execution is similar for 4 success case.

Any suggestions to overcome this behavior. (this happens very randomly)

2. I have a Function which does two actions (mean in two different pages).

If I run this function the expected will be to run both the actions under a Function should run fine without any issue. But the second action is not running once the first action is over. If I comment out the first action then I run it, the second one runs fine. This happens everytime. I don't have a clue how to overcome this.

Kindly suggest some inputs...

Regards,
Dal...

Re: Script Execution Issues

Posted: Wed Sep 29, 2010 3:45 pm
by Ciege
Can you comment about the (any) errors you get when things do not run properly?
Maybe you are not waiting for objects to become active before trying to do some work? Try putting in code that waits for existence and readiness of objects (not just hard wait times).

There are lots of things that could be the problem. If we know that your code does work at times that means your steps are probably correct but the supporting code of how you get there needs fine tuning.

Re: Script Execution Issues

Posted: Fri Nov 12, 2010 6:51 am
by dal
Team,

Here is again we are facing some script execution issues, if we are running huge list of scripts (about 230 plus test scenarios) which will have to run for about 6 - 7 Hrs continously.

Mostly the issues observed in synchronization.

Script play-back is not waiting for the objects to be loaded before perform any operation on to it.

For E.g. I need to click on the "Cancel" button on the Web Page, once its displayed on the screen. I have given the Timeout for that object is 20sec. So my expectation is, script should wait for the max of 20 secs and perform operation on to it, but its not waiting.

There are cases it works fine, but there are cases the cursor is moving to the Top Left Cornor of the Web Page even the object is appeared on the Web Page.

We have done many things to tackle the issue, but fail to do it effectively... Any suggestions please....

Following are the Scripting Snippet have been used to handle the Sync... (given in bit by bit)

Section - 1
Keyboard.DefaultKeyPressTime = 100
Mouse.DefaultClickTime = 100
Mouse.DefaultMoveTime = 0
Delay.SpeedFactor = 2.0

Section - 2
Do
Loop Until Object.InnerText.Contains("Cancel")

Section - 3
Delay.Seconds (5)

Section - 4
Object.Self.WaitForDocumentLoaded

And another issue observed is ... I have a For Loop which I want to execute for say 5 times, Its able to perform the operation by identifying the Objects inside the loop for 3 times comfortably, for the 4 time its not able to identify few objects though it appeared on a WebPage. Don't know where the issue is happening...

Really it looks very strange to me.

Regards,
Dal...

Re: Script Execution Issues

Posted: Mon Nov 15, 2010 3:02 pm
by Support Team
Hi Dal,

We recommend our customers specially for web pages to turn of the Caching setting and set the timeout to 30 seconds for the elements. The first issue sounds similar to following post http://www.ranorex.com/forum/confusing- ... t1784.html
And for the second issue, maybe turn off the cache would solve it.

Turn of caching

Regards,
Peter
Ranorex Team