积极答复者
WebBrowser有没有什么成熟的方法跳过文件保存对话框?

问题
-
Winform中使用webBrowser控件模拟了网页的登录、页面的跳转、执行Javascript下载文件脚本,然后弹出“文件下载对话框”
,网上搜列了一些解决方法:
1. 模拟按键下载 -->缺点:等待时间不确定,而且程序运行时易受其他操作影响,不是太成熟的做法
2.找到下载url,添加用户验证信息 -->具体url没有找到,而且添加用户登录信息后还是跳转登录界面。
3.重写IDownloadManager,这个有点高级了,我比较初级,没搞懂,而且如何抓到下载对话框以及如何跳转使用IDownloadManager也不知道如何实现的。
请教各路高手们,有没有成熟、简易的做法跳过这个烦人的保存对话框?
答案
-
你好,
据我所知,这个“文件下载对话框”,是浏览器的安全特征, 我们没有办法通过程序来绕开它。不然的话,就可以随意向客户端硬盘保存东西了。
Best regards,
Cole Wu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Wendy ZangMicrosoft contingent staff, Moderator 2016年9月13日 1:46
- 已标记为答案 Wendy ZangMicrosoft contingent staff, Moderator 2016年9月13日 1:49
全部回复
-
你好,
据我所知,这个“文件下载对话框”,是浏览器的安全特征, 我们没有办法通过程序来绕开它。不然的话,就可以随意向客户端硬盘保存东西了。
Best regards,
Cole Wu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已建议为答案 Wendy ZangMicrosoft contingent staff, Moderator 2016年9月13日 1:46
- 已标记为答案 Wendy ZangMicrosoft contingent staff, Moderator 2016年9月13日 1:49