NAME
WWW::WebKit2 - Perl extension for controlling an embedding WebKit2 engine
SYNOPSIS
use WWW::WebKit2;
my $webkit = WWW::WebKit2->new(xvfb => 1);
$webkit->init;
$webkit->open("http://www.google.com");
$webkit->type("q", "hello world");
$webkit->click("btnG");
$webkit->wait_for_page_to_load(5000);
print $webkit->get_title;
DESCRIPTION
WWW::WebKit2 is a drop-in replacement for WWW::Selenium using Gtk3::WebKit2 as browser instead of relying on an external Java server and an installed browser.
EXPORT
None by default.
PROPERTIES
console_messages
WWW::WebKit saves console messages in this array but still lets the default console handler handle the message. I'm not sure if this is the best way to go but you should be able to override this easily:
use Glib qw(TRUE FALSE);
$webkit->view->signal_connect('console-message' => sub {
push @{ $webkit->console_messages }, $_[1];
return TRUE;
});
The TRUE return value prevents any further handlers from kicking in which in turn should prevent any messages from getting printed.
METHODS
init
Initializes WebKit2 and GTK3. Must be called before any of the other methods.
process_confirmation_prompt
SEE ALSO
See WWW::Selenium for API documentation. See Test::WWW::WebKit2 for a replacement for Test::WWW::Selenium. See Test::WWW::WebKit2::Catalyst for a replacement for Test::WWW::Selenium::Catalyst.
The current development version can be found in the git repository at: https://github.com/sorryforthecommit/WWW-WebKit2
AUTHOR
Jason Shaun Carty <jc@atikon.com>, Philipp Voglhofer <pv@atikon.com>, Philipp A. Lehner <pl@atikon.com>
COPYRIGHT AND LICENSE
Copyright (C) 2020 by Jason Shaun Carty, Philipp Voglhofer and Philipp A. Lehner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.