![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: WWW::Mechanize fetch differs from firefox browser result (was Re: WWW::Mechanize or WWW::Selenium with javascript redirect)by tphyahoo (Vicar) |
on Jan 18, 2007 at 18:53 UTC ( #595311=note: print w/replies, xml ) | Need Help?? |
Okay, I bullied a coworker into letting me use their windows box, and tried out Win32::IE::Mechanize. Unfortunately, I don't think this is going to work either. But I learned some things.
Reason it won't work: "The internet Explorer automation object does not provide an interface to popup windows generated by security settings or Jscript contained on the page" (from the docu). Unless I am mistaken, when I try to open my target page, there is exactly this: a javascript redirect. The effect of my test program (below) is that an empty IE window, with a blank browser bar, gets opened, and separately a second window is opened with the html that I want. But as the docu says, there is no way to get at the second window. (Since the window that I am able to get html from appears to be the blank one.) Unless there is some way to get around this "no way to access popup windows" issue with OLE or something (and I know nothing about OLE) I guess this is a dead end. I was next going to try out Mozilla::Mechanize, but I read in the docu for that that it was based on IE::Mechanize, and the docu doesn't even mention popups, so I'm going to save it for last. Finally there is Selenium. Selenium has a function called That seems promising. As I said above, I had troubles getting selenium to work with perl on linux. Maybe I'll have better luck on windows. I'll report my findings when they are in. Finally, FWIW, here's my experimentations with mechanize, and my failed attempts to work around the popup window.
In Section
Seekers of Perl Wisdom
|
|