18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
i need help in using excel sheets
What's the meaning for this error..
Wrapped net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundException: c:sahi\userdata\scripts\td\values1.csv (The system cannot find the path specified)
i am trying to automate one name entry form using excel sheets , in that i am passing 3 values 1,lastname 2.firstname and address ..i have to insert atleast 100 datas per execution.please give me some sample script.
this is my script
_popup(/App.*/)._click(_span("Names[1]"));
_popup(/App.*/)._click(_span("Names Edit/Entry"));
function addNewuser($getlasname, $getfirstname, $getaddress){
try{
_popup(/App.*/)._setValue(_textbox("custNames\$LastName"), "$getlasname");
_popup(/App.*/)._setValue(_textbox("custNames\$FirstName"), "$getfirstname");
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), " ");
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), "$getaddress");
_popup(/App.*/)._click(_imageSubmitButton("Save"));
}catch(e){
_logException(e);
}
}
var $data = _readCSVFile("c:sahi/userdata/scripts/td/values1.csv")
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addNewuser($row[0], $row[1], $row[2]);
}
the same script i found in our sahi testerdesk.com example only... but not working for me..
i used in this way also
function addNewuser($lasname, $firsname, $adress){
_popup(/App.*/)._click(_span("Names[1]"));
_popup(/App.*/)._click(_span("Names Edit/Entry"));
_popup(/App.*/)._setValue(_textbox("custNames\$LastName"), "$lasname");
_popup(/App.*/)._setValue(_textbox("custNames\$FirstName"), "$firsname");
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), " ");
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), "$adress");
_popup(/App.*/)._click(_imageSubmitButton("Save"));
}
var $data =_readCSVFile("c:sahi\userdata\scripts\td\values.csv")
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addNewuser($row[0], $row[1], $row[2]);
}
Wrapped net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundException: c:sahi\userdata\scripts\td\values1.csv (The system cannot find the path specified)
i am trying to automate one name entry form using excel sheets , in that i am passing 3 values 1,lastname 2.firstname and address ..i have to insert atleast 100 datas per execution.please give me some sample script.
this is my script
_popup(/App.*/)._click(_span("Names[1]"));
_popup(/App.*/)._click(_span("Names Edit/Entry"));
function addNewuser($getlasname, $getfirstname, $getaddress){
try{
_popup(/App.*/)._setValue(_textbox("custNames\$LastName"), "$getlasname");
_popup(/App.*/)._setValue(_textbox("custNames\$FirstName"), "$getfirstname");
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), " ");
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), "$getaddress");
_popup(/App.*/)._click(_imageSubmitButton("Save"));
}catch(e){
_logException(e);
}
}
var $data = _readCSVFile("c:sahi/userdata/scripts/td/values1.csv")
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addNewuser($row[0], $row[1], $row[2]);
}
the same script i found in our sahi testerdesk.com example only... but not working for me..
i used in this way also
function addNewuser($lasname, $firsname, $adress){
_popup(/App.*/)._click(_span("Names[1]"));
_popup(/App.*/)._click(_span("Names Edit/Entry"));
_popup(/App.*/)._setValue(_textbox("custNames\$LastName"), "$lasname");
_popup(/App.*/)._setValue(_textbox("custNames\$FirstName"), "$firsname");
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), " ");
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._click(_checkbox("adrMainAddress\$chkVerify"));
_popup(/App.*/)._setValue(_textbox("adrMainAddress\$txtFrom"), "$adress");
_popup(/App.*/)._click(_imageSubmitButton("Save"));
}
var $data =_readCSVFile("c:sahi\userdata\scripts\td\values.csv")
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addNewuser($row[0], $row[1], $row[2]);
}
Comments
Can you verify by replaying the file path "c:sahi\..." with "c:/sahi/..." ?
Also you can use c:\\sahi\\...