From: Ash Berlin Date: Sun, 8 Mar 2009 13:44:44 +0000 (+0000) Subject: Try to make tests pass X-Git-Tag: 0.06~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-WWW-Selenium-Catalyst.git;a=commitdiff_plain;h=a9714b27c04fe65994981b7eff674a8401fc674f Try to make tests pass --- diff --git a/lib/Test/WWW/Selenium/Catalyst.pm b/lib/Test/WWW/Selenium/Catalyst.pm index 014694f..339a430 100644 --- a/lib/Test/WWW/Selenium/Catalyst.pm +++ b/lib/Test/WWW/Selenium/Catalyst.pm @@ -247,7 +247,8 @@ END { if($www_selenium){ diag("Shutting down Selenium Server $sel_pid") if $DEBUG; $www_selenium->stop(); - $www_selenium->do_command('shutDown'); + # 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; diff --git a/t/01-live.t b/t/01-live.t index 0cb2d87..4ef6706 100644 --- a/t/01-live.t +++ b/t/01-live.t @@ -10,7 +10,8 @@ use IPC::Cmd qw/can_run/; my $have_apps = can_run('java') && - ( can_run('firefox') || can_run('firefox-bin') ); + ( can_run('firefox') || can_run('firefox-bin') ) || + $ENV{WE_HAVE_SELENIUM}; SKIP: { unless ($have_apps) { @@ -34,7 +35,7 @@ SKIP: { } ); }; - skip $@, 80 if $@; + skip $@, 79 if $@; $sel->open_ok('/'); $sel->text_is("link=Click here", "Click here");