Stefan Seifert > Test-WWW-WebKit-0.02 > Test::WWW::WebKit

Download:
Test-WWW-WebKit-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.02   Source   Latest Release: Test-WWW-WebKit-0.03

NAME ^

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

SYNOPSIS ^

    use Test::WWW::WebKit;

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

    $webkit->open_ok("http://www.google.com");
    $webkit->type_ok("q", "hello world");
    $webkit->click_ok("btnG");
    $webkit->wait_for_page_to_load_ok(5000);
    $webkit->title_is("foo");

DESCRIPTION ^

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

EXPORT

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:

    $webkit->alerts([]);
    $webkit->click('...');
    $webkit->wait_for_alert;

native_drag_and_drop_to_object_ok($source, $target)

Drag&drop test that works with native HTML5 D&D events.

SEE ALSO ^

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

AUTHOR ^

Stefan Seifert, <nine@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2011 by Stefan Seifert

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.

syntax highlighting: