瀏覽代碼

Added more coercion

Emmanuel Peroumalnaik 11 年之前
父節點
當前提交
bd14177871
共有 1 個文件被更改,包括 2 次插入0 次删除
  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'},
 );