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

Use Driver's ua in demolish to automatically any proxies/etc

Daniel Gempesaw 10 жил өмнө
parent
commit
402841eacd

+ 1 - 2
lib/Selenium/Chrome.pm

@@ -61,9 +61,8 @@ sub DEMOLISH {
     my ($self) = @_;
     my ($self) = @_;
 
 
     if ($self->binary_mode) {
     if ($self->binary_mode) {
-
         my $port = $self->port;
         my $port = $self->port;
-        my $ua = LWP::UserAgent->new;
+        my $ua = $self->ua;
 
 
         $ua->get('127.0.0.1:' . $port . '/wd/hub/shutdown');
         $ua->get('127.0.0.1:' . $port . '/wd/hub/shutdown');
     }
     }

+ 1 - 2
lib/Selenium/PhantomJS.pm

@@ -62,9 +62,8 @@ sub DEMOLISH {
     my ($self) = @_;
     my ($self) = @_;
 
 
     if ($self->binary_mode) {
     if ($self->binary_mode) {
-
         my $port = $self->port;
         my $port = $self->port;
-        my $ua = LWP::UserAgent->new;
+        my $ua = $self->ua;
 
 
         $ua->get('127.0.0.1:' . $port . '/wd/hub/shutdown');
         $ua->get('127.0.0.1:' . $port . '/wd/hub/shutdown');
     }
     }