Explorar o código

Add ua as Driver init option to allow use of Test::LWP::UserAgent

Daniel Gempesaw %!s(int64=11) %!d(string=hai) anos
pai
achega
963bed646c
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      lib/Selenium/Remote/Driver.pm

+ 7 - 1
lib/Selenium/Remote/Driver.pm

@@ -301,11 +301,17 @@ has 'remote_conn' => (
         my $self = shift;
         return Selenium::Remote::RemoteConnection->new(
             remote_server_addr => $self->remote_server_addr,
-            port               => $self->port
+            port               => $self->port,
+            ua                 => $self->ua
         );
     },
 );
 
+has 'ua' => (
+    is      => 'lazy',
+    builder => sub { return LWP::UserAgent->new }
+);
+
 has 'commands' => (
     is      => 'lazy',
     builder => sub { return Selenium::Remote::Commands->new; },