ソースを参照

Check for session id and autoclose before binary quitting

Daniel Gempesaw 10 年 前
コミット
7e8bcbc56b
1 ファイル変更3 行追加2 行削除
  1. 3 2
      lib/Selenium/CanStartBinary.pm

+ 3 - 2
lib/Selenium/CanStartBinary.pm

@@ -209,8 +209,9 @@ sub _build_binary_mode {
 sub shutdown_binary {
     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) {
         my $port = $self->port;