Jump to content

Check for Download dialog in IE 11?


Recommended Posts

Hi guys,

I am writing an automated website test script and have a page with some download links to test.

The site is in ASP.NET MVC, the download link is like this: https://websiteurl.com/services/download?linkAddress=download%2Finteractive-sdk.zip

I can click the link via the DOM and IE11 brings up the download message at the botton of the window.

When I used Au3Info.exe and mouse over the download dialog I see:

>>>> Control <<<<
Class:    DirectUIHWND
Instance:    1
ClassnameNN:    DirectUIHWND1
Name:    
Advanced (Class):    [CLASS:DirectUIHWND; INSTANCE:1]
ID:    
Text:  

etc...

I tried using:

WinGetClassList()

But it showed the class name "DirectUIHWND1" before and after download dialog appeared in browser.

so I thought maybe it was just hidden, so I tried:

ControlCommand( "[CLASS:DirectUIHWND; INSTANCE:1]", "", "", "IsVisible", "")

but is returned 0 both before and after download dialog appeared in browser.

 

So I guess I am going about it the wrong way. Does anyone have an idea, or exampe of checking for the IE11 download dialog or perhaps another method of verifying the file is availble for download?

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Link to comment
Share on other sites

  • Moderators

If you look through the IUIAutomation thread in the Examples forum, I know there is a post in there specifically about clicking the download button in IE (the post # escapes me at the moment).

'?do=embed' frameborder='0' data-embedContent>>

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Thanks for your help guys.

Got there in the end with:

Local $hWindow
$hWindow = WinGetHandle( "[CLASS:IEFrame]" ) ; Internet Explorer
ControlCommand ( $hWindow, "", "[CLASS:Frame Notification Bar; INSTANCE:1]", "IsVisible", "" )

It at least returns 0 before the download button is clicked and 1 after button clicked, so is enough to verify the dialog showed up at least.

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...