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.
setFile2 doesn't open the popup window to select the file
in Sahi Pro
Hi All,
I am using SAHI PRO v7.0.1. version and I am trying to click the link "Select File" and open the popup however, it doesn't open the popup. It loads the path of the file in the textbox, however, I would like the popup window to be opened so that I can select the file.
_click(_label("Select File"));
_setFile2(_file("filePathUpload"), "C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg");
I am using SAHI PRO v7.0.1. version and I am trying to click the link "Select File" and open the popup however, it doesn't open the popup. It loads the path of the file in the textbox, however, I would like the popup window to be opened so that I can select the file.
_click(_label("Select File"));
_setFile2(_file("filePathUpload"), "C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg");
Comments
Sahi handles file download and upload in little different way. You will not see any file upload or dialog box coming on UI. It will upload the file in the background using the proxy. Please modify your code from
_click(_label("Select File"));
_setFile2(_file("filePathUpload"), "C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg");
to
_setFile2(_file("filePathUpload"), "C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg");
and check. If this doesn't work, please try with the Action URL. You can find complete details in the link below.
http://sahipro.com/docs/sahi-apis/action-apis.html#File Upload
If this doesn't work, please contact support@sahipro.com