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.
How to Upload a File ? Getting HTTP 500 error
I have trying to Upload a file Using setFile command but i m getting HTTP 500 error Every time i Execute the Script.
Since we cant record the Upload Action , i need to attach a file and Click on Submit button to Upload the File Successfully.
Please Help me in Uploading a file (CSV file)
thanks,
satish
Since we cant record the Upload Action , i need to attach a file and Click on Submit button to Upload the File Successfully.
Please Help me in Uploading a file (CSV file)
thanks,
satish
Best Answer
-
Hi Satish,
Can you please let me know what version of Sahi are you using?
Try using the API _setFile2 with the latest Sahi Pro release.
If the problem still persists, can you please attach your script file here?
Regards.
Answers
i m using SAHI with Version 5.0.3 .
i used _setFile2(_file("id"), "C:\\Flat_Files.xls"); script to attach a file , the attach file field is getting the Specified file in its box but when i click on Submit button i m getting HTTP 500 error
You can provide the URL where you have to upload the file, as the third parameter of _setFile2 API.
Let me know whether that resolves your issue.
Regards.