Browse Source

Added more coercion

Emmanuel Peroumalnaik 11 năm trước cách đây
mục cha
commit
bd14177871
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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'},
 );