Эх сурвалжийг харах

Clean up the chromedriver session after ourselves

Daniel Gempesaw 10 жил өмнө
parent
commit
ef722e5fb1

+ 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;