Test::WWW::Selenium::More
by:
One minute
146 Words
2012-05-16 20:00 -0400
I recently released Test::WWW::Selenium::More to CPAN. It is a small collection of utilities to help you write Selenium tests. Here are some reasons to use it:
-
It has a manual which provides a concise but fairly comprehensive howto guide to Selenium testing in Perl.
-
It uses Moose so you can more easily use roles. For example you might want a role for methods that deal with authentication and a role for methods that deal with payments.
-
Smarter testing with methods like wait_for_jquery() and jquery_click(). You should never sleep() in your Selenium tests because that leads to slow tests with random failures which leads to frustration, low morale, hair pulling, and heavy drinking.
-
Method chaining. Here is what this looks like:
use Test::Most; use Test::WWW::Selenium::More; Test::WWW::Selenium::More->new() ->note('Search google') ->open_ok("http://www.google.com") ->title_like(qr/Google Search/) ->type_ok('cat pictures') ->follow_link_ok('Search') ->note('Check the number of results') ->is_text_present_ok('2 bajillion results'); done_testing;
Bugs or patches? https://github.com/kablamo/Test-WWW-Selenium-More