in reply to Automatic mechanization

It is possible to record browser events with Win32::OLE for Internet Explorer on Windows. We can grab the user actions from it and convert into appropriate forms to generate WWW:Mechanize code.

artist

Replies are listed 'Best First'.
Re: Re: Automatic mechanization
by Jenda (Abbot) on May 18, 2003 at 16:40 UTC

    Do you have any example code of this?

    We do have a tool that sends some data to sites by faking a user with MSIE and we do have a tool to help the admins set up the actions necessary, but being able to capture the events would be even better. :-)

    Update:Thanks Corion++ and Artist++. Sure Corion, the admins would have to modify the captured events to make this a bit more general, the "replay" tool already allows them to set conditional jumps, find links to click based on parts of URLs, fill form fiels by ID or name, run pieces of JavaScript, etc. etc. etc. And the admins do get notified if the site changes and the replay tool cannot do its job. Anyway the more help I can give them the better (don't believe anything the marketing says about technology! As usual.).

    Jenda
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
       -- Rick Osborne

    Edit by castaway: Closed small tag in signature

      While I do not have code directly for this, other people already did something similar which should be easily adaptable to your secondary intention (mad props to Google):

      1. Dave Roth on IE events
      2. Perlmonth on IE events
      I'm still not sure that you will be able to automate changing websites, but to record and replay user actions and the sequence of requests, this should be enough.

      perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web