[Jifty-commit] jifty branch, master, updated. 1.10518-43-g732d91e
Jifty commits
jifty-commit at lists.jifty.org
Sun Sep 11 12:04:07 EDT 2011
The branch, master has been updated
via 732d91ef004e1a9bd94f1cffb8c8349eae25d749 (commit)
from f62c72e32060c0e59e374ea3306f037d022f4302 (commit)
Summary of changes:
AUTHORS | 1 +
lib/Jifty/Test/WWW/Selenium.pm | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 732d91ef004e1a9bd94f1cffb8c8349eae25d749
Author: Luke Closs <luke at 5thplane.com>
Date: Fri Sep 9 13:58:12 2011 -0700
Support using a subclassed Test::WWW::Selenium
diff --git a/AUTHORS b/AUTHORS
index 00c86c6..0c7d2a3 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -38,3 +38,4 @@ Jason May <jason.a.may at gmail.com>
Stanislav Sinyagin <ssinyagin at k-open.com>
Tomohiro Hosaka <bokutin at bokut.in>
Kazuhiro Osawa <ko at yappo.ne.jp>
+Luke Closs <lukec at cpan.org>
diff --git a/lib/Jifty/Test/WWW/Selenium.pm b/lib/Jifty/Test/WWW/Selenium.pm
index 051c120..a00dcff 100644
--- a/lib/Jifty/Test/WWW/Selenium.pm
+++ b/lib/Jifty/Test/WWW/Selenium.pm
@@ -26,7 +26,9 @@ starts selenium remote control for you, unless C<SELENIUM_RC_SERVER>
is specified when the test is run. You might also want to set
C<SELENIUM_RC_TEST_AGAINST> to your local IP address so
C<SELENIUM_RC_SERVER> can test against you. C<SELENIUM_RC_BROWSER>
-tells the rc server what browser to run the tests with.
+tells the rc server what browser to run the tests with. You may want
+to set C<SELENIUM_CLASS> to a subclass of L<Test::WWW::Selenium> to
+refactor methods common to your application.
=head2 rc_ok
@@ -59,13 +61,14 @@ sub rc_ok {
$args{browser_url} ||= 'http://'.($ENV{SELENIUM_RC_TEST_AGAINST} || $args{test_server} || 'localhost').':'.$server->port;
$args{browser} ||= $ENV{SELENIUM_RC_BROWSER} || $class->_get_default_browser;
+ $args{selenium_class} ||= $ENV{SELENIUM_CLASS} || 'Test::WWW::Selenium';
$SIG{CHLD} = \&_REAPER;
my $try = 5;
my $sel;
while ($try--) {
- $sel = eval { Test::WWW::Selenium->new( %args, auto_stop => 0 ) };
+ $sel = eval { $args{selenium_class}->new( %args, auto_stop => 0 ) };
last if $sel;
Test::More::diag "waiting for selenium rc...";
sleep 3;
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list