Gtk2::WebKit::Mechanize - WWW::Mechanize done with HTML WebKit engine.


Gtk2-WebKit-Mechanize documentation  | view source Contained in the Gtk2-WebKit-Mechanize distribution.

Index


NAME

Top

Gtk2::WebKit::Mechanize - WWW::Mechanize done with HTML WebKit engine.

SYNOPSIS

Top

    $mech = Gtk2::WebKit::Mechanize->new;

    $mech->get('http://www.example.org');

    $mech->submit_form(fields => { field_a => 'A', field_b => 'B' });

    # returns "Hello"
    $mech->run_js('return "He" + "llo"');

DESCRIPTION

Top

This module provides WWW::Mechanize like interface using WebKit browser engine.

Aditionally it allows access to some of JavaScript functionality (e.g. calling JavaScript functions, accessing alerts and console messages etc.).

CONSTRUCTION

Top

Gtk2::WebKit::Mechanize->new;

Constructs new Gtk2::WebKit::Mechanize object.

METHODS

Top

$mech->get($url)

Loads $url.

$mech->run_js($js_str)

Evaluates $js_str in the context of the current page.

$mech->submit_form(%args)

Submits first form on pages using $args{fields}.

ACCESSORS

Top

$mech->title

Returns page title.

$mech->content

Returns current page source.

At present it uses document.body.innerHTML. Therefore page source will not be identical to the one sent by server.

AUTHOR

Top

    Boris Sukholitko
    CPAN ID: BOSU
    boriss@gmail.com

COPYRIGHT

Top

SEE ALSO

Top

WWW::Mechanize, Mozilla::Mechanize, Mozilla::Mechanize::GUITester


Gtk2-WebKit-Mechanize documentation  | view source Contained in the Gtk2-WebKit-Mechanize distribution.