NAME
Test::WWW::Selenium - Tesing applications using WWW::Selenium
SYNOPSIS
ues Test::More tests => 4;
use Test::WWW::Selenium;
use WWW::Selenium::Launcher::Default;
use WWW::Selenium::RpcCommandProcessor;
my $selenium = Test::WWW::Selenium->new
( WWW::Selenium::RpcCommandProcessor->new
( 'http://localhost:8080/selenium-driver' ),
WWW::Selenium::Launcher::Default->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->stop;
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.
AUTHOR
Mattia Barbon <mbarbon@cpan.org>
LICENSE
Copyright (c) 2005 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