Explorar o código

Clean up the chromedriver session after ourselves

Daniel Gempesaw %!s(int64=10) %!d(string=hai) anos
pai
achega
ef722e5fb1
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      lib/Selenium/Chrome.pm

+ 10 - 0
lib/Selenium/Chrome.pm

@@ -116,4 +116,14 @@ sub _probe_port {
         Timeout => 3
         Timeout => 3
     );
     );
 }
 }
+
+sub DEMOLISH {
+    my ($self) = @_;
+
+    my $port = $self->port;
+    my $ua = LWP::UserAgent->new;
+
+    $ua->get($default_binary_server . ':' . $port . '/wd/hub/shutdown');
+}
+
 1;
 1;