X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FTest%2FWWW%2FSelenium%2FCatalyst.pm;h=339a4307798c1f7630f4fc492c17336074bfe94d;hb=a9714b27c04fe65994981b7eff674a8401fc674f;hp=96807ffef346c3471ff11afb858e31d3e2322d9f;hpb=8f552b3b1a93a93723b1fe30461bed018536d9b9;p=catagits%2FTest-WWW-Selenium-Catalyst.git diff --git a/lib/Test/WWW/Selenium/Catalyst.pm b/lib/Test/WWW/Selenium/Catalyst.pm index 96807ff..339a430 100644 --- a/lib/Test/WWW/Selenium/Catalyst.pm +++ b/lib/Test/WWW/Selenium/Catalyst.pm @@ -24,7 +24,7 @@ Test::WWW::Selenium::Catalyst - Test your Catalyst application with Selenium =cut -our $VERSION = '0.03'; +our $VERSION = '0.05'; =head1 DEVELOPERISH RELEASE @@ -175,7 +175,7 @@ sub import { $DEBUG = $d; } - unless ($args{-no_seleniun_server}) { + unless ($args{-no_selenium_server}) { $class->_start_server($args{-selenium_args}) or croak "Couldn't start selenium server"; } return 1; @@ -246,7 +246,9 @@ END { if($sel_pid){ if($www_selenium){ diag("Shutting down Selenium Server $sel_pid") if $DEBUG; - $www_selenium->do_command('shutDown'); + $www_selenium->stop(); + # This can fail if a page hasn't been requested yet. + eval { $www_selenium->do_command('shutDown') }; undef $www_selenium; } diag("Killing Selenium Server $sel_pid") if $DEBUG;