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 and write csv files in Twist with sahi driver
Hi,
I am using Twist with sahi driver. And i would be using java version to write the code.
Can somebody help me the syntax in java version for _readCSVFile and _writeCSVFile? I tried using it as
Var data = readCSVFile("c:/test.csv"), but it throws an error that method is not defined.
Do let me know if i need to have any other jar files that are needed prior to reading csv files in Twist.
Thanks,
Harika
I am using Twist with sahi driver. And i would be using java version to write the code.
Can somebody help me the syntax in java version for _readCSVFile and _writeCSVFile? I tried using it as
Var data = readCSVFile("c:/test.csv"), but it throws an error that method is not defined.
Do let me know if i need to have any other jar files that are needed prior to reading csv files in Twist.
Thanks,
Harika
Comments
It is not possible to write into a CSV, but you can read from a CSV by using the following code:
Also, add import java.io.File; at the starting.
Regards
Sumitra
_readCSVFile and _writeCSVFiles are not currently available in the Java version. But it is fairly trivial to use some java code to do the read and write. When using the Java version, Sahi APIs only give you access to the browser. The rest of the APIs like read, write from files etc. are be done using Java or some APIs in Twist. You could ask the Twist team for it.
Regards,
Narayan