Actually here is a script ...

VERSION BUILD=6011206 RECORDER=CR SET !TIMEOUT_PAGE 10 SET !ERRORIGNORE YES SET !ERRORCONTINUE YES SET !DATASOURCE C:\test_url.csv SET !LOOP 1 SET !DATASOURCE_LINE {{!LOOP}} URL GOTO={{!COL1}} WAIT SECONDS=5 TAG POS=1 TYPE=A ATTR=HREF:{{!COL2}} WAIT SECONDS=5 TAB CLOSE TAB T=1 SET !LOOP 2 URL GOTO={{!COL1}} WAIT SECONDS=5 TAG POS=1 TYPE=A ATTR=HREF:{{!COL2}} WAIT SECONDS=5 

Please help me loop this piece

  SET !LOOP 2 URL GOTO={{!COL1}} WAIT SECONDS=5 TAG POS=1 TYPE=A ATTR=HREF:{{!COL2}} WAIT SECONDS=5 

The number of lines is always different.

    1 answer 1

     SET !DATASOURCE_COLUMNS 5 

    You need to set the number of columns in your csv file. You, I see two of them, so the value will be not 5, but 2. I hope that it helped.