Feature request: for very long scripts it would be nice to “pause” the script on the SUT (in case you need to do something else on that machine) and then un-pause the script when you are done.
The way it is now if you “Abort Script” I guess you can doubleclick the last line returned in the results window to return where the script left off and then select from there to the bottom of the script and “Run Selection” - if there’s a better way please let me know.
We’ve talked about adding this feature and it will probably show up in a later release. It might appear as part of an enhanced debugging mode. There are a number of situations where this type of functionality would be useful.
I would suggest that the scenario that you’ve suggested is sort of risky; doing “something else” on a SUT while a script is executing could easily leave the SUT in a state where resumption of the script might not be possible. I should also point out that if your script is running as a test, then you might not want to do a “Run Selection”, since this doesn’t generate a log file. If you’re running the script for the purposes of automation then you may not care about the log.
The issue we are having is, we have to pause a script so that the tester can select a unique value of text in a table row, and then continue executing the script. We have a system that only allows unique entries every time a new patient is created. I imagine we could use the same name every time, as there are other unique identifiers, however, this would quickly become unmanageable when trying to review lists of names.
There is a pauseScript command that works the same way as the Pause button. However, it seems like you might have better luck just automating this process. You could use code to create a random string of characters:
set myImageName to (any item of a..z for each item of 1..6) joined by empty
This code snippet can generate over 300 million different 6 character strings – it’s not guaranteed that you won’t get the same string twice, but you can see the odds are in your favor – add a character or two and they get even better.
Another option is to create a file of user names that you can read in and iterate over. Or increment a counter that you write to a file each time and read back in for the subsequent runs:
put the first word of file "/path/to/file" into codeNum
add 1 to codeNum
typeText "baseName" & codeNum
put codeNum in file "/path/to/file"
In this way you can maintain a counter over time to reuse in script runs to continue to generate unique names.