automate downloading zip file via IE7 on XP without getting windows file download dialog

30 views
Skip to first unread message

Jimmy Chan

unread,
May 5, 2009, 12:15:32 PM5/5/09
to Windmill Developers
I am trying to automate this scenario:

go to a website -> sign up an account -> at the end of sign up
process, user needs to download a zip file

I was able to automate downloading zip file via FF3 on XP without
getting windows file download dialog, see the details at
http://groups.google.com/group/windmill-dev/browse_thread/thread/2f761f79e123cf0c/96f78222fb226151?lnk=gst&q=file+download#96f78222fb226151.

However, I am having trouble with IE7 on XP, and there is a known
issue with IE7/XP:

Zip Files Downloaded with Internet Explorer Are Not Saved to Your
Computer
http://support.microsoft.com/kb/308090

I installed Orbit Downloader on IE7, http://www.orbitdownloader.com/.
With this tool, I can successfully download zip file to any folder
without getting windows file download dialog.

However, when I run IE7 with windmill, I get the known issue again,
http://support.microsoft.com/kb/308090, somehow, Orbit Downloader
doesn't get triggered to download the zip file.

Does windmill do anything when launching IE7 such that Orbit
Downloader doesn't get loaded/enabled? Do I need to set Orbit
Downloader's proxy settings in order to work with windmill properly?

I will also look into pywinauto if using Orbit Downloader as a
workaround fails.

Please let me know if you have other solutions.

Thanks in advance.

Mikeal Rogers

unread,
May 5, 2009, 12:31:46 PM5/5/09
to windmi...@googlegroups.com
I wouldn't try to have the browser download the file.

Instead, I would use execJs to get the url for the file back in to
Python and download the file in Python and validate it there.

-Mikeal

monogeo

unread,
May 5, 2009, 2:03:24 PM5/5/09
to Windmill Developers
Hi Mikael,

In order to use the url to download the zip file, I have to pass in
the value of an attribute from the web session, e.g.

symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes:
{user_id: '123' } }

How do I get the web session attributes from the test case? And how do
I pass the attribute value with the url? I did spend lot of time on
googling this, but have no luck.

Thank you.

Jimmy


On May 5, 9:31 am, Mikeal Rogers <mikeal.rog...@gmail.com> wrote:
> I wouldn't try to have the browser download the file.
>
> Instead, I would use execJs to get the url for the file back in to  
> Python and download the file in Python and validate it there.
>
> -Mikeal
>
> On May 5, 2009, at May 5, 20099:15 AM, Jimmy Chan wrote:
>
>
>
> > I am trying to automate this scenario:
>
> > go to a website -> sign up an account -> at the end of sign up
> > process, user needs to download a zip file
>
> > I was able to automate downloading zip file via FF3 on XP without
> > getting windows file download dialog, see the details at
> >http://groups.google.com/group/windmill-dev/browse_thread/thread/2f76...
> > .
>
> > However, I am having trouble with IE7 on XP, and there is a known
> > issue with IE7/XP:
>
> > Zip Files Downloaded with Internet Explorer Are Not Saved to Your
> > Computer
> >http://support.microsoft.com/kb/308090
>
> > I installed Orbit Downloader on IE7,http://www.orbitdownloader.com/.

Adam Christian

unread,
May 5, 2009, 3:03:26 PM5/5/09
to windmi...@googlegroups.com
The session variables are not accessible in javascript, so we are
going to have to find another way to get that data. Is this passed
around by the URL anywhere, or stored in a cookie at any point? Is the
ID displayed anywhere when you auth or view the profile page?

I'm not sure what it would take to parse out request headers from
within a test, Mikeal?

Adam

monogeo

unread,
May 5, 2009, 3:28:52 PM5/5/09
to Windmill Developers
Hi Adam,

The session variable isn't passed by the url, neither stored in
cookie.

Symfony automatically manages user sessions and is able to keep
persistent data between requests for users. It uses the built-in PHP
session-handling mechanisms and enhances them to make them more
configurable and easier to use.

Go to http://www.symfony-project.org/book/1_0/06-Inside-the-Controller-Layer,
and search for 'user session' for more details.

Thanks,
Jimmy

monogeo

unread,
May 15, 2009, 2:49:53 AM5/15/09
to Windmill Developers
Finally, I am able to use PAMIE (Python Automation Module For Internet
Explorer), http://pamie.sourceforge.net/, to automate windows dialogs
like File Download and Save As dialogs.

The cModalPopUp.py from pamie20.zip works great for handling windows
dialogs! Here is the code I added to my windmill test script:

if testenvinfo['browser'] == 'ie7':
# hanle File Download dialog
dialogThread = cModalPopUp.handlePopup ("FileDownload",
"&Save")
dialogThread.setName('Close FileDownload dialog thread')
dialogThread.start()
dialogThread.join()
time.sleep(5)
# hanle Save As dialog
dialogThread = cModalPopUp.handlePopup ("SaveAs", "&Save")
dialogThread.setName('Close SaveAs dialog thread')
dialogThread.start()
dialogThread.join()
time.sleep(5)

Jimmy


On May 5, 9:15 am, Jimmy Chan <mono...@gmail.com> wrote:
> I am trying to automate this scenario:
>
> go to a website -> sign up an account -> at the end of sign up
> process, user needs to download a zip file
>
> I was able to automate downloading zip file via FF3 on XP without
> getting windows file download dialog, see the details athttp://groups.google.com/group/windmill-dev/browse_thread/thread/2f76....
>
> However, I am having trouble with IE7 on XP, and there is a known
> issue with IE7/XP:
>
> Zip Files Downloaded with Internet Explorer Are Not Saved to Your
> Computerhttp://support.microsoft.com/kb/308090
>
> I installed Orbit Downloader on IE7,http://www.orbitdownloader.com/.
> With this tool, I can successfully download zip file to any folder
> without getting windows file download dialog.
>
> However, when I run IE7 with windmill, I get the known issue again,http://support.microsoft.com/kb/308090, somehow, Orbit Downloader

Adam Christian

unread,
May 16, 2009, 8:21:36 PM5/16/09
to windmi...@googlegroups.com
Jimmy, this is really awesome -- thanks for the contrib.

I am going to play around with this stuff this week and then do a blog
entry!

Adam
Reply all
Reply to author
Forward
0 new messages