Explorar el Código

Added more coercion

Emmanuel Peroumalnaik hace 11 años
padre
commit
bd14177871
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      lib/Selenium/Remote/Driver.pm

+ 2 - 0
lib/Selenium/Remote/Driver.pm

@@ -181,6 +181,7 @@ available here.
 
 has 'remote_server_addr' => (
     is      => 'rw',
+    coerce  => sub { ( defined($_[0]) ? $_[0] : 'localhost' )},
     default => sub {'localhost'},
 );
 
@@ -198,6 +199,7 @@ has 'platform' => (
 
 has 'port' => (
     is      => 'rw',
+    coerce  => sub { ( defined($_[0]) ? $_[0] : '4444' )},
     default => sub {'4444'},
 );