How to enable automatic downloads in IE11

2019-09-15 07:53发布

I using WatIn (IE11), i make click's on files then i have download dialog that shows,i need to start this download automaticly with out pressing saveAs button and typing the path. The reason is-- I have program that run's when my windows is lock and WatIn saveAs function need interactive UI sow it wont work.

标签: c# asp.net watin
2条回答
一纸荒年 Trace。
2楼-- · 2019-09-15 08:23

I found a way to do this, but you need to use User32.dll sendmessage() function, after you press button\link and you have your download dialog i use sendmessage to send key's i send:

1- (F6) it will select the download dialog.

2-(Tab) -it will select the first option Save.

3- (Enter) will press Save button that will save file to deafault derectory

4- For 100% i check in registry the defeaul folder of IE and easy find my file and copy it to directory that i need.

Why i use sendmessage and not sendKey?

Answer: sendmessage will still press on buttons even if windown is lock no need UI.

查看更多
We Are One
3楼-- · 2019-09-15 08:38

Browser security will not allow this.

查看更多
登录 后发表回答