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.
save as popup
Hi,
I have an issue from the explanation given in "sahi.co.in/forums/viewtopic.php?id=698" .
I want to download an excel file(trade.xlsx) by clicking the 'Download file' button
in "filejumbo.com/Download/7F5094F6B8B7BD8F/".
As explained I have Opened config/download_contenttypes.txt, and add the word "excel" on a
line by itself.
For example, ---start---
application/zip
excel
---end---
My script is like this:
_click(_submit("Download file"));
_wait(2000);
_assertEqual("trade.xlsx", _lastDownloadedFileName());
_saveDownloadedAs("D:/trade1.xlsx");
_clearLastDownloadedFileName();
But still I am Getting the "Save As" popup during playback ,
How to resolve this issue?
I have an issue from the explanation given in "sahi.co.in/forums/viewtopic.php?id=698" .
I want to download an excel file(trade.xlsx) by clicking the 'Download file' button
in "filejumbo.com/Download/7F5094F6B8B7BD8F/".
As explained I have Opened config/download_contenttypes.txt, and add the word "excel" on a
line by itself.
For example, ---start---
application/zip
excel
---end---
My script is like this:
_click(_submit("Download file"));
_wait(2000);
_assertEqual("trade.xlsx", _lastDownloadedFileName());
_saveDownloadedAs("D:/trade1.xlsx");
_clearLastDownloadedFileName();
But still I am Getting the "Save As" popup during playback ,
How to resolve this issue?
Comments
Ask your programmer
or
Navigate to the page where the download button is
Stop the proxy
Open sahi.properties, set debug.traffic.log = true
Restart the proxy
Click the download file button.
Stop the proxy once the file dialog comes up.
Go to sahi/logs/traffic
You will see a lot of folders. Look for one with the file name to be downloaded.
In that folder, open response.header in a text editor.
Look for content-type in it.
Pick some word unique in that content type and add it to download_contenttypes.txt
Also post the content-type here in the forums for others to know.
NOTE: Be sure to set debug.traffic.log = false in sahi.properties. It creates a HUGE number of files and you may have trouble deleting them later.
Regards,
Narayan
Thanks a lot Narayan.I followed the procedure described by u.
My content types is like this:
application/vnd.ms-powerpoint.
Now every thing is working fine for me,and also I am not getting the "Save as" pop up during playback.
I have one more issue also.
In a webpage ,a link is there called"Event Planning Survey Design Tips" ,by clicking which a pdf gets displays.
I want to save this pdf to my local disc by rightclicking on this link ,and then selecting "Save Target As.." option from the right click menu.
1).I have added _rightClick(_link("Event Planning Survey Design Tips"));
for recording right click .During play back this piece of code is showing no error.But the desired menu is
not coming during playback.
2).Also tell me how to capture the "save Target As.." option from the menu that will come after right click.