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

Check for session id and autoclose before binary quitting

Daniel Gempesaw 10 жил өмнө
parent
commit
7e8bcbc56b

+ 3 - 2
lib/Selenium/CanStartBinary.pm

@@ -209,8 +209,9 @@ sub _build_binary_mode {
 sub shutdown_binary {
 sub shutdown_binary {
     my ($self) = @_;
     my ($self) = @_;
 
 
-    # TODO: Allow user to keep browser open after test
-    $self->quit;
+    if ( $self->auto_close && defined $self->session_id ) {
+        $self->quit();
+    }
 
 
     if ($self->has_binary_mode && $self->binary_mode) {
     if ($self->has_binary_mode && $self->binary_mode) {
         my $port = $self->port;
         my $port = $self->port;