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.
Asked
Active
Viewed 5,732 times
0
-
I don't know watin as such so maybe there's something in it, but speaking only of IE, you just can't force this, this is browser behaviour and has nothing to do with HTML itself. – Laurent S. Jul 09 '14 at 11:13
-
You want the browser to download a file to a location on the user's computer that the user hasn't specified? Not going to happen, for very good reasons – freefaller Jul 09 '14 at 11:19
-
Are you sure?All browser have default derectiory for automatic downloads,in IE11 they just change this option.i just downloaded 1min ago file with chrome and chrome didn't even ask me where to save it.HHmmmmm... Do you familiar with folder 'C:\Users\UserName\Downloads' ??? – user3567884 Jul 09 '14 at 11:43
2 Answers
1
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.

user3567884
- 213
- 1
- 6
- 19
0
Browser security will not allow this.

Gordon Hickley
- 491
- 1
- 7
- 17
-
press here http://launchpad.net/nunitv2/trunk/2.6.3/+download/NUnit-2.6.3.msi with chrome – user3567884 Jul 09 '14 at 11:47
-
That is link direct to a download file, it will download because request is user initiated. – Gordon Hickley Jul 09 '14 at 11:49
-
yes but if you try this in IE11 you will have a download dialog.And that what i am trying to do to enable automatic downloads in IE11 that it will act like chorome – user3567884 Jul 09 '14 at 11:54