From: Matt S Trout Date: Wed, 22 Jun 2011 12:39:15 +0000 (+0100) Subject: construct the Test::WWW::Selenium object ourselves to prevent Socialtext::WikiFixture... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a6bcc328703bb4593104022beeb261a640742ff;p=scpubgit%2FTest-Harness-Selenium.git construct the Test::WWW::Selenium object ourselves to prevent Socialtext::WikiFixture::Selenese shutting down the selenium session before we're ready --- diff --git a/lib/Test/Harness/Selenium.pm b/lib/Test/Harness/Selenium.pm index da496c3..29bac16 100644 --- a/lib/Test/Harness/Selenium.pm +++ b/lib/Test/Harness/Selenium.pm @@ -78,11 +78,16 @@ sub start_selenium_server { my $tries = 0; while($tries < 5) { eval { + # if we don't create the ::Selenium object ourselves, then + # wikifixture shuts the session down after the first test table + # is run, at which point KABOOM when you try and run a second one. $self->{src} = Socialtext::WikiFixture::Selenese->new( - host => $self->{selenium_rc}{host}, - port => $self->{selenium_rc}{port}, - browser => $self->{browser}, - browser_url => $self->{app_base}, + selenium => Test::WWW::Selenium->new( + host => $self->{selenium_rc}{host}, + port => $self->{selenium_rc}{port}, + browser => $self->{browser}, + browser_url => $self->{app_base}, + ) ); }; $tries++;