in reply to Re^2: Automate WebLogin
in thread Automate WebLogin

Learn what your browser sends, then send that from Perl. For example, using the Live HTTP Headers extension. Or learn Javascript and how it interacts with the HTML DOM, and what the click for a submit button does. Or just modify the code to find it out.

Replies are listed 'Best First'.
Re^4: Automate WebLogin
by libvenus (Sexton) on Jan 26, 2011 at 14:04 UTC

    Thanks for you help! I read the documentation of both JE and SpiderMonkey. Gave JE a shot but i m unable to proceed. Here is the code that i wrote to test JE:

    use strict; use warnings; use JE; use Data::Dumper; use File::Slurp; my $je = new JE; $je->html_mode(1); $je->eval(scalar read_file 'output.js'); my $return_val = $je->eval('start()') or die $@;

    The file output.js has the content of the javascript webpage that i want to parse.When i run the above script the JE failes with the follwing error:

    ReferenceError: The variable start has not been declared at line 1.

    Thanks!

      Your approach differs from any advice you've been given. JE is an alpha release, are you sure you want to continue to ignore the advice you've been give on tried and tested routes and use this?