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 record pop up file browser window?
Hi narayan,
I m new to Sahi, but understood the basics well. i m testing a web application developed in php and when i tried recording a pop file browser window, it would not records that part. I tried using _popup() API, but couldn't figure out how to select a file from the list displayed. Pls help me out in this issue.
Thanks In advance,
Siva
I m new to Sahi, but understood the basics well. i m testing a web application developed in php and when i tried recording a pop file browser window, it would not records that part. I tried using _popup() API, but couldn't figure out how to select a file from the list displayed. Pls help me out in this issue.
Thanks In advance,
Siva
Comments
i went thru the link and even tried with the sample code u provided, but the solution just changes the field type from "file_upload" to "text" and on uploading, the web application does not recognizes the upload field, as the field type has been changed. Whereas when i try the same scenario manually, it works fine. pls help me with this issue.
Note: the _setFile(), works well as it puts the given file path without any issues.
Let me brief the scenario,
1. The php page has a field with the type "upload_file".
2. On clicking the browse button or on just clicking on that field, Will open a "file browser" to select the desired file.
3. the user will browse and select the file and click on Open.
4. On clicking the Upload button, the selected file will be uploaded to the DB.
Now, the Sahi understands the Step 1 and 4, but not the Step 2 and 3, pls give me some solution...
I hope the details are clear, if not pls reply me as soon as possible..
Thanks in advance
Siva
2) Check if the URL to which the form is being submitted is correct. Sometimes the URL is changed when the form is submitted, and Sahi needs to be told about it using the 3rd parameter in _setFile
Nahin chala to email kar. narayan@sahi.co.in
Cheers!
_setFile(_file("file_0"), "D:\\sahi\\userdata\\User Guide.docx");
_call(_file("file_0").type = "text");
_setValue(_textbox("file_0"), "User Guide.docx");
the file path is set on the text box, but when i upload, it always prompt to select a file first. by the way, we have ajax in this page. could you give me answer?
Send the source code and script to http://support@sahi.co.in.let we work on it.
Regards
Theeran.