An Example of Looping Through URL's


Here is an example script of how to loop through a list of URL's, perhaps looking for an error.


setSpeed 850  
store baseUrl
store 0 counter
store /wiki/Nerd+/wiki/The_Nerd+/wiki/The_Nerds+/wiki/The_Angry_Video_Game_Nerd page
store javascript{storedVars['page'].split('+').length} newPage
label nextURL  
storeEval {storedVars['page'].split('+')[storedVars['counter']]} currFS
open ${baseUrl}${currFS}  
pause 1000  
verifyTextNotPresent Unexpected Error isUnexpectedErrorPresent
storeEval javascript{storedVars['counter'] + 1} counter
gotoIf storedVars['counter'] < storedVars['newPage'] nextURL
echo Finished  

Another looping example: