more huge script debug helps

I have a very long script (several hundred lines long with multiple repeats in it so much of the same code is similar - it enters about 1000 classified ads in multiple classifications, cars, help wanted, etc) and tried running it over the weekend and it failed. :frowning:

It would be very cool if when a script fails it gave you a line number or some other clue as to exactly where it got to (since the script has about 6 sections of nearly similar code (just entering a different chunk of text into a different classification).

I am going to start reading the hefty docs (which document is best to start with?)

Since I am a newbie I am probably overlooking something but when I came in this morning and saw that it failed I had no clue where it got to in the script, all I had to go on was this:

Fri, 3/19/04 5:36:58 PM	Exception	zip	Image Not Found On Screen "zip" Within 20.00 Seconds
Selection Failed in 1:31:39  Image Not Found waitfor Error - Image Not Found On Screen "zip" Within 20.00 Seconds

So from that I get that it didn’t find an image on the screen, probably cuz I was a numbskull and had a screensaver on the SUT and that the script ran for about an hour and a half. Being able to turn on and off line numbers and have a line number in the error would be very cool cuz now I have to guess where it got to and try “run selection” to see if I can get it to complete tonight.

Any other ideas - and help on which part of the docs would be best to read first would be very appreciated. I read “Getting Started” and small parts out of eggplant reference and sensetalk reference so far. Thank you very much for your good/complete answers thus far.

Thanks,

Brad

Brad:

Just double click on the exception line in the results and it will open the script window with that line highlighted. This actually works for any line in the results – just double click it and it will open the script and highlight that line. You might want to add some log messages to your script to help you figure out more precisely what is happening. One thing I recommend is to put the following in your repeat loops:

log “Iteration #” & repeatIndex()

This will tell you the repeat count for any given trip through the repeat loop.

Hope this helps you sort things out.