Explorar el Código

Add predicates to remote_server_addr and port

This will help us define the default behavior for Selenium::Firefox and
Selenium::Chrome. If the user specifies a server address and/or port,
they probably already have something in mind. If no address or port is
specified, we'll try finding the binaries ourselves and starting them,
taking care of setting the port ourselves.

If that doesn't work, we're considering falling back to the default
behavior of trying to start up a browser on localhost:4444/wd/hub.
Daniel Gempesaw hace 10 años
padre
commit
f65bc3edb5
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

@@ -260,6 +260,7 @@ has 'remote_server_addr' => (
     is      => 'rw',
     coerce  => sub { ( defined($_[0]) ? $_[0] : 'localhost' )},
     default => sub {'localhost'},
+    predicate => 1
 );
 
 has 'browser_name' => (
@@ -289,6 +290,7 @@ has 'port' => (
     is      => 'rw',
     coerce  => sub { ( defined($_[0]) ? $_[0] : '4444' )},
     default => sub {'4444'},
+    predicate => 1
 );
 
 has 'version' => (