Sfoglia il codice sorgente

Added more coercion

Emmanuel Peroumalnaik 11 anni fa
parent
commit
bd14177871
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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'},
 );