NAME
Test::WWW::Selenium - Tesing applications using WWW::Selenium
SYNOPSIS
ues Test::More tests => 4;
use Test::WWW::Selenium;
# Launch a browser
my $selenium_url = 'http://localhost/selenium';
my $browser = WWW::Selenium::Launcher::Default->new;
$browser->launch("$selenium_url/SeleneseRunner.html");
END { $browser->close if $browser }
my $selenium = Test::WWW::Selenium->new;
$selenium->open_ok( 'http://localhost:8080/index.html' );
$selenium->title_is( 'Some title' );
$selenium->click_and_wait_ok( 'link_id' );
$selenium->title_like( qr/title/i );
$selenium->finished;
REQUIREMENTS
The tests need to be run on the same machine as the web server. The web server must have Selenium installed, and the Selenium driver installed.
DESCRIPTION
This module is a WWW::Selenium
subclass providing some methods useful for writing tests. For each Selenium command (open, click, click_and_wait, ...) there is a corresponding <command>_ok method that checks its return value (open_ok, click_ok, click_and_wait_ok).
For each Selenium getter (get_title, ...) there are six autogenerated methods (<getter>_is, <getter>_isnt, <getter>_like, <getter>_unlike, <getter>_contains, <getter>_lacks) to check the value of the attribute.
You can use bot Java-style (openOk, titleIs, titleLacks) and Perl-style (open_ok, title_is, title_lacks) in method names.
DRIVEN MODE
Please see the section with the same name in WWW::Selenium.
AUTHORS
Maintained by Luke Closs <lukec@cpan.org>
Originally by Mattia Barbon <mbarbon@cpan.org>
LICENSE
Copyright (c) 2006 Luke Closs <lukec@cpan.org> Copyright (c) 2005,2006 Mattia Barbon <mbarbon@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself