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.
hwo to import .csv file
Hi
M trying to import file , i checked other posts related to it nd i tried all of them
bt its taking blank file and showing " import successful" in console.
M using this code
data = data+"05janCu.csv";
String csv="csv";
browser.setFile(elementStub, data);
browser.execute("_sahi._call("+elementStub+".type = "+csv+")");
browser.setValue(elementStub, data);
elementStub.click();
here elementstub=_sahi._file("theFile")
and data =
/QARun/Input/Reusable Scripts/Import Files\05janCu.csv
please suggest me , its urgent for me
M trying to import file , i checked other posts related to it nd i tried all of them
bt its taking blank file and showing " import successful" in console.
M using this code
data = data+"05janCu.csv";
String csv="csv";
browser.setFile(elementStub, data);
browser.execute("_sahi._call("+elementStub+".type = "+csv+")");
browser.setValue(elementStub, data);
elementStub.click();
here elementstub=_sahi._file("theFile")
and data =
please suggest me , its urgent for me
Comments
Use
instead of
Why are you setting the type to csv and then setting its value? Are there any validations on that field?
Regards,
Narayan
There r valiations on textfield,
it should be in .csv format,
bt the thing is ..
i have tried "
console is showin success..bt its not showing ny response on screen,
so how i wil come to knw tat whether its taking a blank file or its really uploading some file..!!
Are there any errors on Sahi's console? (Console means where start_sahi.bat is running) What is visible on the Controller?
If you can email the html file (which has that form field) to support@sahi.co.in from your official id, we can look at it deeper and help you.
Regards,
Narayan