The Perl Advent Calendar needs more articles for 2022. Submit your idea today!


Test::WWW::WebKit2 - Perl extension for using an embedding WebKit2 engine for tests


    use Test::WWW::WebKit2;

    my $webkit = Test::WWW::WebKit2->new(xvfb => 1);

    $webkit->type_ok("q", "hello world");


Test::WWW::WebKit2 is a drop-in replacement for Test::WWW::Selenium using Gtk3::WebKit2 as browser instead of relying on an external Java server and an installed browser.


None by default.

Additions to the Selenium API

wait_for_alert_ok($text, $timeout)

Wait for an alert with the given text to happen. If $text is undef, it waits for any alert. Since alerts do not get automatically cleared, this has to be done manually before causing the action that is supposed to throw a new alert:


native_drag_and_drop_to_position_ok($source, $target_x, $target_y, $options)

Drag and drop $source to position ($target_x and $target_y)

native_drag_and_drop_to_object_ok($source, $target, $options)

Drag and drop $source to $target.


WWW::Selenium for the base package. See Test::WWW::Selenium for API documentation. Test::WWW::WebKit::Catalyst for a replacement for Test::WWW::Selenium::Catalyst


Jason Shaun Carty <>, Philipp Voglhofer <>, Philipp A. Lehner <>


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.