B
Babul
Hello everyone,
I am trying to write a program in perl (windows) that I will use to
fill out online form.
Here are the steps that I follow to get the online form:
1. I go to the web site first and get a Login 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.
3. Now a page display with some project names, dates of my choosen
week and box field to enter time that I spent on that progect.
I tried WWW::Mechanize to get the contents of the web page.
Here are the steps I followed to grab the contents of the web page:
#! /usr/local/bin/perl
use Tk;
use Cwd;
use WWW::Mechanize;
$currentDir = getcwd;
$mech = WWW::Mechanize->new();
$mech->get("web address from the 3rd step above");
$contents = $mech->content();
open WF, ">$currentDir/temp.txt";
print WF "$contents\n";
close WF;
But the contents I get is the source code of the Login page (from step
1 above). My purpose is to get the source code of the web page which
is displayed in step 3.
If any one can help me I would appreciate that.
Note: I also noticed that If I go to View->Source on the Internet
Explorer to view the HTML source code of that web page, it does not
display. But I can view source code using View->Source for any other
web sites.
Regards,
Babul
I am trying to write a program in perl (windows) that I will use to
fill out online form.
Here are the steps that I follow to get the online form:
1. I go to the web site first and get a Login 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.
3. Now a page display with some project names, dates of my choosen
week and box field to enter time that I spent on that progect.
I tried WWW::Mechanize to get the contents of the web page.
Here are the steps I followed to grab the contents of the web page:
#! /usr/local/bin/perl
use Tk;
use Cwd;
use WWW::Mechanize;
$currentDir = getcwd;
$mech = WWW::Mechanize->new();
$mech->get("web address from the 3rd step above");
$contents = $mech->content();
open WF, ">$currentDir/temp.txt";
print WF "$contents\n";
close WF;
But the contents I get is the source code of the Login page (from step
1 above). My purpose is to get the source code of the web page which
is displayed in step 3.
If any one can help me I would appreciate that.
Note: I also noticed that If I go to View->Source on the Internet
Explorer to view the HTML source code of that web page, it does not
display. But I can view source code using View->Source for any other
web sites.
Regards,
Babul