18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Sahi to restart where it left off

GHallsGHalls Members
edited November -1 in Sahi - Open Source
Hi.

I am new to Sahi, and I am currently building the script to work for our needs.

I have configured Sahi to read from a tab delimited list, and to visit the URL with no issues. I have also managed to configure Sahi to write the record number of the URL its just visited to a file.

What we want to do is configure Sahi so when it loads (starts running) it cross-refernces the number in that file, and loads the next record (i.e. adds 1 to the record number last visited). The file is in tab delimited format, and as such the URL is the first piece of information stored. The record number is also stored in the file we are reading from (after the first tab), so in my eyes, it needs to:

Loop through the list until it reaches the number of the last visited URL, loads this URL and then carries on looping through.

Any help would be appreciated.

Comments

  • Hi

    I don't really get where the problem is? You loop through some values and write your index to a file. Later you can read from that file to initialize the loop with the index from that file.
    var $k=null;
    try{
      $k=_readCSVFile($PATH)[0][0];
      $data=_readCSVFile($DATA_PATH)
    }
    for (var $i = $k || 0; ... ; ... ){
      _navigateTo($data[$i][0])
    }
    
    
    Where do you need suggestions?
Sign In or Register to comment.