construct the Test::WWW::Selenium object ourselves to prevent Socialtext::WikiFixture...
Matt S Trout [Wed, 22 Jun 2011 12:39:15 +0000 (13:39 +0100)]
lib/Test/Harness/Selenium.pm

index da496c3..29bac16 100644 (file)
@@ -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++;