소스 검색

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


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.