Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

setFile2 doesn't open the popup window to select the file

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");

Comments

  • Hello,

    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
Sign In or Register to comment.