Download File : Save & open button

Apr 8, 2013 at 1:54 PM
Hello,
When I download a file, the file download popup appears.
I can do a send-click on the cancel button but not Save or Open.
All other features work.

I have a french version.
$IE = New-Object -comObject InternetExplorer.Application.1 ; $IE.visible = $True 
$IE.Navigate("http://www.XXXX.fr/request?type=VIE&date=20130326&ext=zip")
Select-Window iexplore | Remove-Window -Passthru |Select-ChildWindow | Select-Control

Title
-----
...
Ou&vrir
En&registrer
Annuler
...

Select-Window iexplore | Remove-Window -Passthru |Select-ChildWindow | Select-Control -title "En&registrer"

Title
-----
En&registrer

Select-Window iexplore | Remove-Window -Passthru |Select-ChildWindow | Select-Control -title "En&registrer" -recurse |send-click
Regards,
Coordinator
Apr 8, 2013 at 5:31 PM
I'm hoping someone who's tried that before will pipe up, but if you're getting the frame notification, the simplest way to deal with those is with the hotkey for the button you want: %S (Alt+S) for Save, or %O (Alt+O) for Open:
$IE = New-Object -comObject InternetExplorer.Application.1 ; $IE.visible = $True 
$IE.Navigate("https://wasp.codeplex.com/downloads/get/55849")
Start-Sleep 3
Select-Window iexplore | Select-Control -Class "Frame Notification Bar" | Send-Keys "%S"
Apr 9, 2013 at 8:35 AM
Thank's for you answer.

I tried...sleep.
a = Select-Window iexplore | Remove-Window -Passthru |Select-ChildWindow |set-windowactive ; sleep 3 ; $a |Send-Keys "%r"
Coordinator
Apr 9, 2013 at 4:01 PM
So is it working for you?

For what it's worth, the only reason I used Start-Sleep is because in my example, .Navigate() is going to a page that redirects to the actual download, so I had to wait for the download to start and show up on the notification.