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.
_readFile function does not work in relative path
Hi All,
There is one issue i observe with _readFile function.
_readFile function only works with Absolute Path: [Eg: _readFile("C:\\test.txt"); ]
If we use relative path something like [Eg: _readFile("test.txt");] script fails. It does not throw any error on console. script file and text.txt exist in the same folder though.
This behavior makes it difficult to work on Mac OS. It restricts the interopobility.
I went through "http://sahi.co.in/w/_readfile" help, it does not mention any example about how to use relative path.
Can any one please let me know, how to work with relative path using _readFile() function ?
There is one issue i observe with _readFile function.
_readFile function only works with Absolute Path: [Eg: _readFile("C:\\test.txt"); ]
If we use relative path something like [Eg: _readFile("test.txt");] script fails. It does not throw any error on console. script file and text.txt exist in the same folder though.
This behavior makes it difficult to work on Mac OS. It restricts the interopobility.
I went through "http://sahi.co.in/w/_readfile" help, it does not mention any example about how to use relative path.
Can any one please let me know, how to work with relative path using _readFile() function ?
Comments
Eg.
_readFile(_userDataDir() + "/scripts/myFile.txt")