in reply to Re: Is there any Perl Module to handle HTML Pages
in thread Is there any Perl Module to handle HTML Pages

I need to track the messages on HTML Pages & then click Buttons with respect to the sentences, for example while a processing is running , HTML page will display status - "Processing" Once the job get completed pages displays "Completed" Then i need to press few buttons. So, i need to track this message, click some buttons & finally exit.
  • Comment on Re^2: Is there any Perl Module to handle HTML Pages

Replies are listed 'Best First'.
Re^3: Is there any Perl Module to handle HTML Pages
by davorg (Chancellor) on May 19, 2006 at 09:22 UTC

    Sounds like you want to automate interaction with a web page. If that's the case then I second gellyfish's recommendation for WWW::Mechanise.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re^3: Is there any Perl Module to handle HTML Pages
by dorward (Curate) on May 19, 2006 at 09:24 UTC

    (I'm a bit unclear as to if you are writing something that produces webpages, or something that tests the production of webpages by something else. I'm assuming the former for this:)

    Writing web applications (which I assume you are doing, as I've very very rarely seen HTML used in other types of application) is fundamentally different from writing regular GUI applications. It is a client-server system with a stateless protocol.

    The server cannot send any data to the client except in response to a request from the client, and there is no built in way to tell one client from another.

    So, one way to do what you want is to identify users with sessions, and when the request to start the long process comes in, fork it into the background and have it set a flag (probably in a database) when it is finished, then have the browser (using client side code such as a meta refresh or (buzzword alert) Ajax) make requests every $n seconds to another process which checks the status of the aforementioned flag.

    I'm not aware of anything which implements all this in one module, but something like Catalyst or CGI::Application may be the way to go.