mken has asked for the wisdom of the Perl Monks concerning the following question:

Hi have an old test suite based on Mechanize which I'm moving to IE::Mechanize. One test downloads a file (in mech/lwp you set something like content_type: to a local file name and so forth). IE::Mech is not LWP based, so you can't do this. Ideally I'd need a way to "right click" a link /select "save target" (and use autoit to process the resulting dialog).

Replies are listed 'Best First'.
Re: Right click with IE::Mechanize
by Anonymous Monk on Jul 17, 2008 at 10:19 UTC
    get, then open FOO.. print FOO $ie->content
      Yes, that does work for text files. I should have mentioned these are pdf files. ie/acrobat intervenes in their handling leaving Mechanize with no content.
      You get this error if you try $ie->content
      Can't use an undefined value as a HASH reference at C:/Perl/site/lib/Win32/IE/Mechanize.pm line 393.
      which is:
      sub content { $_[0]->{agent}->Document->documentElement->{outerHTML} }