From: Chris Nehren Date: Fri, 17 Dec 2010 16:22:50 +0000 (-0500) Subject: fixes for running against Selenium IDE-generated tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=799fcc5076c6cd9c24354e3f44ef6000543ad703;p=scpubgit%2FTest-Harness-Selenium.git fixes for running against Selenium IDE-generated tests --- diff --git a/lib/Test/Harness/Selenium.pm b/lib/Test/Harness/Selenium.pm index d4eda0e..ecaf665 100644 --- a/lib/Test/Harness/Selenium.pm +++ b/lib/Test/Harness/Selenium.pm @@ -6,7 +6,7 @@ use Socialtext::WikiFixture::Selenese; use HTML::TableExtract; use IO::All; -use Test::Builder; +use Test::More; BEGIN { package Test::Builder; @@ -48,6 +48,7 @@ sub run_tests_for { browser_url => $self->{browser_url}, ); $src->run_test_table($rows); + done_testing; } my $te = HTML::TableExtract->new; @@ -57,8 +58,8 @@ sub get_rows_for { $te->parse($html); my $table = ($te->tables)[0]; my @rows = map { - [ map { $_ eq "\240" ? () : $_ } @$_ ] - } $table->rows; + [ map { (!defined $_ or $_ eq "\240") ? () : $_ } @$_ ] + } grep { defined $_->[1] } $table->rows; return \@rows; } diff --git a/t b/t index b6430f1..6bae426 100644 --- a/t +++ b/t @@ -11,4 +11,4 @@ my $s = Test::Harness::Selenium->new({ browser_url => 'http://www.google.com', browser => shift, }); -$s->run_tests_for('basic.html'); +$s->run_tests_for(shift);