mmittiga17 has asked for the wisdom of the Perl Monks concerning the following question:
Hi All, I am using Win32::IEAutomation to navigate a website, click website buttons. This works well as LWP or Mech would not work for this site. Problem is when I choose to download file the "Download File" window appears and I can not get the Save button to fire. Here is my code, thoughts suggestions?
use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow + SendKeys); $Win32::GuiTest::debug = 0; # Set to "1" to enable verbose mode my @windows = FindWindowLike(undef, "^File Download","#32770"); SetForegroundWindow($windows[0]); print "$windows[0]>\t'", GetWindowText($windows[0]), "'\n"; PushButton("^\&Save",1); sleep(2); SendKeys("%S"); while(FindWindowLike(0, "^Download Complete")) { PushButton("Close",2); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32::GuiTest for File download
by BrowserUk (Patriarch) on Nov 12, 2010 at 19:29 UTC | |
by mmittiga17 (Scribe) on Nov 12, 2010 at 19:59 UTC | |
by marto (Cardinal) on Nov 12, 2010 at 20:19 UTC | |
by mmittiga17 (Scribe) on Nov 12, 2010 at 21:12 UTC | |
by BrowserUk (Patriarch) on Nov 12, 2010 at 20:03 UTC |
Back to
Seekers of Perl Wisdom