Parcourir la source

Stop minimizing firefox window via Selenium::Firefox

Daniel Gempesaw il y a 10 ans
Parent
commit
93b960d94d
1 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 9 1
      lib/Selenium/CanStartBinary.pm

+ 9 - 1
lib/Selenium/CanStartBinary.pm

@@ -269,7 +269,15 @@ sub _cmd_prefix {
     my ($self) = @_;
 
     if (IS_WIN) {
-        return 'start "' . $self->window_title . '" /MIN '
+        my $prefix = 'start "' . $self->window_title;
+
+        # Let's minimize the command windows for the drivers that have
+        # separate binaries - but let's not minimize the Firefox
+        # window itself.
+        if (! $self->isa('Selenium::Firefox')) {
+            $prefix .= '" /MIN ';
+        }
+        return $prefix;
     }
     else {
         return '';