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.
Read the content of a file
Hi
I tried to read the content of a file by using below line
_readFile("C:\sahi_Latest\userdata\scripts\viv001.txt");
It throws this error :
JSERROR
Wrapped net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundException: C:sahi_Latestuserdatascripts iv001.txt (The filename, directory name, or volume label syntax is incorrect) at Aug 3, 2010 6:29:02 PM
Please say how to rectify this error.
I tried to read the content of a file by using below line
_readFile("C:\sahi_Latest\userdata\scripts\viv001.txt");
It throws this error :
JSERROR
Wrapped net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundException: C:sahi_Latestuserdatascripts iv001.txt (The filename, directory name, or volume label syntax is incorrect) at Aug 3, 2010 6:29:02 PM
Please say how to rectify this error.
Comments
Sahi is not considering this line and execute the remaining scripts and then say Playback success
Script is not retrieved from viv001.txt
I think what you are looking for is _include, not _readFile.
Please go through the documentation for these APIs to know more.
http://sahi.co.in/w/_include
http://sahi.co.in/w/_readFile
Regards,
Narayan