zelvin_ng
12 years agoNew Contributor
Scripts fail randomly in different spot.
Hi,
I am just wondering why sometime my scripts fail in the middle of the test sometime it pass through the whole scripts with exactly the same scripts 6 hours run. The funny thing is, it fails in the different spot every time the scripts stop. I found out most of the problem is about timing issue and Keys method. I try to avoid some of the timing issue problem by using Wait method. I even need to repeat the 'Keys' method for the one it fails for the first time. The thing is I needs to scripts more tests instead of fixing the issue that occurs randomly in the existing scripts. Is anyone encounters this problem before? Hope anyone can help me out here. Thank you very much
- As far as I understand your problem is the script is going in a faster pace then the application itself (for example you click "next" and try to click on a button that appears on the next screen, while the button did not load yet).
You are probably best off with one of the two solutions:
You can also set the project itself to act more slowly :
Right click your project in the "Project workspace"
Edit --> Properties --> Playback
Edit the appropriate parameters to have longer timeout / delay.
For example to wait 5 seconds between each action you perform change "Delay between events,ms" to 5000.
You could enter a "wait for button / control" method with a while loop for each time you try to click a control (preferably with a defined timeout).