Преглед на файлове

Fixing the issue #36. If the proxy is never set, then it is not even included in the desired capabilities.

Aditya Ivaturi преди 13 години
родител
ревизия
f07ad7d605
променени са 3 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      lib/Selenium/Remote/Driver.pm
  2. 0 0
      t/mock-recordings/01-driver-mock-MSWin32.json
  3. 0 0
      t/mock-recordings/02-webelement-mock-MSWin32.json

+ 5 - 3
lib/Selenium/Remote/Driver.pm

@@ -214,8 +214,6 @@ sub new {
             }
         }
         $self->{proxy} = $args{proxy};
-    } else {
-        $self->{proxy} = { proxyType => 'direct' };
     }
 
     # Connect to remote server & establish a new session
@@ -286,10 +284,14 @@ sub new_session {
             'javascriptEnabled' => $self->{javascript},
             'version'           => $self->{version},
             'acceptSslCerts'    => $self->{accept_ssl_certs},
-            'proxy'             => $self->{proxy},
             %$extra_capabilities,
         },
     };
+    
+    if (defined $self->{proxy}) {
+        $args->{desiredCapabilities}->{proxy} = $self->{proxy};
+    }
+    
     my $resp =
       $self->{remote_conn}
       ->request( $self->{commands}->{'newSession'}->{'method'},

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
t/mock-recordings/01-driver-mock-MSWin32.json


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
t/mock-recordings/02-webelement-mock-MSWin32.json


Някои файлове не бяха показани, защото твърде много файлове са промени