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.
Not able to Record in the newly populated window(system browse window)
Hi,
I am using sahi tool to automate a web application. i found new problem while recording a script.
when i click on the browse button in my base window it populate new browse window, from this point my script stop recording in the new browse window.
if anyone came across this issue, and if u can help me let me know the solution for this problem.
Thanks
Jeeva
I am using sahi tool to automate a web application. i found new problem while recording a script.
when i click on the browse button in my base window it populate new browse window, from this point my script stop recording in the new browse window.
if anyone came across this issue, and if u can help me let me know the solution for this problem.
Thanks
Jeeva
This discussion has been closed.
Comments
Could you please be more specific on what you say "it populate new browse window".
Also, are you trying to set a file after you click on the browse button? If so then kindly have a look at _setFile() .
Here are the details:
http://sahi.co.in/w/_setFile
Let me know if you face any problem.
Regards
Sumitra
Please find the below scenario,
Scenario1 : While recording a script When i click a browse button in web page to upload a file , sahi controller does not records the click event on a browse button. But here i have done a click event on a browse button to upload a .Wav file in a web page. When we select a .Wav file from File upload pop-up window, Sahi controller records it as "_setFile(_file("file2"), "hold_message.wav");". While playback the script, Sahi shows a failure message.
Scenario2: While recording a script When i click a browse button in web page to upload a file , it pops-up a new window to upload a file(i.e. File upload window), sahi controller does not records the objects in the pop-up window.
Could you please provide me a solution for the above two issues.?
Thanks in advance.
Regards,
Jeeva
This is how Sahi works for file upload:
In Sahi, you dont have to click on the browser button. You just have to use the _setFile() API which is used to set a file in the file input field.
Form elements of type “file” cannot be populated using javascript on the browser.
So Sahi has a workaround for handling file uploads.
Sahi intercepts the request in the proxy, reads the file off the file system and inserts it into the multipart request.
The file has to be present on that path on the machine running the proxy.
Also, have a look at http://sahi.co.in/w/_setFile
Here is an example and explanation:
Try the following code:
For the second scenario its the same thing which i have explained above.
Let me know if you face any problem.
Regards
Sumitra