|
Posted by Babul on March 24, 2008, 6:01 pm
Please log in for more thread options
> On Sat, 22 Mar 2008 01:05:32 +0100, Joost Diepenmaat wrote:
>
> >> Hello everyone,
>
> > hi!
>
> >> I am trying to write a program in perl (windows) that I will use to
> >> fill out online form.
>
> >> 2. I fill in the Login form and submit that form. Then a page open with=
> >> a link "Choose a period". When I click on that link, a small window
> >> pops up with links for different weeks. I click on my desired week.
>
> > ok
>
> >> I tried WWW::Mechanize to get the contents of the web page.
>
> > That's usually the best module to use for this, yes. but it sounds like
> > the popup is opened via javascript and WWW::Mechanize doesn't support
> > javascript.
>
> It's possible but highly unlikely. I think you didn't read where the
> poster said that he keeps getting the source code for the login window
> when he tries to access the page he wants. The problem is lack of
> authentication. If he has the URL for the popup window, window 3, which
> he said that he does:
>
> $mech->get("web address from the 3rd step above");
>
> it doesn't matter how window 2 opens window 3. Being opened with
> JavaScript has nothing to do with it.
>
> > You either have to figure out how to get at the popup's url via
> > WWW::Mechanize (probably using some hand-written rules), and/or you'll
> > need to "mechanize" a javascript capable browser. Since you're on
> > windows, you may want to try Win32::IE::Mechanize.
>
> No, no, no, this is really bad advice. You didn't read the poster's
> question properly.- Hide quoted text -
>
> - Show quoted text -
Thanks everyone for the guidance and useful thought.
The reason I am using Perl, I already developed a program in Perl to
keep track of my time spend on any project. The program is working
fine and basically it is create a pipe delimited text file with the
following information:
Project name|Task name|Date|Amount of time spent
Now my intention is to add a button in that program so that when I
will click that button it will grab the information from the pipe
delimited file and will fill-out the online form.
|