Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Auto-manual website operations

by sanPerl (Friar)
on Sep 26, 2006 at 09:14 UTC ( #574889=perlquestion: print w/replies, xml ) Need Help??

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

Dear All,
I have a typical problem here. The problem is as follows.
1) I would like to use IE/Mozilla to log into a site.
2) Then I want to click several links and submit several forms.
3) Log out.

Since Mechanize module uses Perl’s browser and I want to log through IE/Mozilla only (For some reasons) I cannot use Mechanize module. I am Not comfortable with complete automation of website browsing. Can you suggest me any method where I can do the #1 & #3 manually but automate #2?

Regards,
SanPerl

Replies are listed 'Best First'.
Re: Auto-manual website operations
by chorny (Scribe) on Sep 26, 2006 at 09:47 UTC
    Several ideas:
    1. look at http://search.cpan.org/~abeltje/Win32-IE-Mechanize-0.009/ . It uses Win32::OLE.
    2. Win32::OLE (A year ago I've created program to modify Excel document via OLE).
    3. You can use persistent login if avalable. Then scan for this cookie in IE/Mozilla files.
    4. Write your program as proxy that will intercept cookie.
    All this is written in assumption that authentification uses cookies. If authentification uses URL, it is much simplier. If Basic authentification - nothing can be done. Digest - variants 1/2/4.
Re: Auto-manual website operations
by robot_tourist (Hermit) on Sep 26, 2006 at 10:07 UTC

    QuickTestPro from Mercury will automate browser actions, but it costs several thousand dollars per seat and uses VB for scripting, which you proabably want to avoid. Mac OSX's automator may do what you want.

    What exactly is it regarding perl's automation that you aren't comfortable with? I haven't used Mechanize, but I'm sure a well designed script would be reasonably robust.

    Also, a quick google search for "ie automation" gives several automation software vendors, plus this: Samie, a perl module for IE automation.

    How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist.
    Robot Tourist, by Ten Benson

      What exactly is it regarding perl's automation that you aren't comfortable with? I haven't used Mechanize, but I'm sure a well designed script would be reasonably robust.
      I don't know about the original poster's issues, but javascript-heavy sites don't work well with WWW::Mechanize. Particularly annoying are webapps that use javascript to generate the HTML you see in the browser, because Mech won't let you submit form fields that it doesn't think exist.
Re: Auto-manual website operations
by InfiniteLoop (Hermit) on Sep 26, 2006 at 15:41 UTC
    Greetings,
    Have you tried http://openqa.org/selenium/ ? You can run your tests, directly from a browser and also setup tests to be driven from perl.
      What exactly is it regarding perl's automation that you aren't comfortable with?
      I normally face problem with Login screen. Apart from this I may have to build long code to compensate small manual descisions. Hence I am trying to get some auto-manual technique, which can be simple and fast.
      Thanks to all for the suggestions

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://574889]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2021-05-06 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (73 votes). Check out past polls.

    Notices?