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.

Not able to retrive data from CSV file

hariprasadhariprasad Members
edited November -1 in Sahi - Open Source
Hi Friends,

I am not able to retrive data from the CSV file, I used the following code:

var $email = _readCSVFile("D:\Sahi\userdata\scripts\TestData\email.csv");
for (var $i=0; $i<$email.length; $i++)
{
var $j = $email[$i];
_alert($j[0]+ " " +$j[1]);
}

When I execute this code it stops executing the script and the following error gets displayed in the Log.

ERROR
Wrapped net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundException: D:\Sahi\userdata\scripts\D:SahiuserdatascriptsTestDataemail.csv (The system cannot find the file specified) at Sep 9, 2011 10:48:41 AM

Though I have specified correct path for the file, why is this error message coming. Can any one help me with this issue?

Regards,
Hari....

Comments

  • Hi hariprasad,

    It should be

    var $email = _readCSVFile("D:\\Sahi\\userdata\\scripts\\TestData\\email.csv");
    instead of
    var $email = _readCSVFile("D:\Sahi\userdata\scripts\TestData\email.csv");

    Regards
    Sumitra
Sign In or Register to comment.