|
@@ -1,6 +1,7 @@
|
|
|
package Selenium::CanStartBinary;
|
|
package Selenium::CanStartBinary;
|
|
|
|
|
|
|
|
# ABSTRACT: Teach a WebDriver how to start its own binary aka no JRE!
|
|
# ABSTRACT: Teach a WebDriver how to start its own binary aka no JRE!
|
|
|
|
|
+use Cwd qw/abs_path/;
|
|
|
use File::Which qw/which/;
|
|
use File::Which qw/which/;
|
|
|
use IO::Socket::INET;
|
|
use IO::Socket::INET;
|
|
|
use Selenium::Waiter qw/wait_until/;
|
|
use Selenium::Waiter qw/wait_until/;
|
|
@@ -18,7 +19,7 @@ CanStartBinary - Role that a Selenium::Remote::Driver can consume to start a bin
|
|
|
use Moo;
|
|
use Moo;
|
|
|
with 'Selenium::CanStartBinary';
|
|
with 'Selenium::CanStartBinary';
|
|
|
extends 'Selenium::Remote::Driver';
|
|
extends 'Selenium::Remote::Driver';
|
|
|
- has 'binary_name' => ( is => 'ro', default => 'chromedriver' );
|
|
|
|
|
|
|
+ has 'binary' => ( is => 'ro', default => 'chromedriver' );
|
|
|
has 'binary_port' => ( is => 'ro', default => 9515 );
|
|
has 'binary_port' => ( is => 'ro', default => 9515 );
|
|
|
1
|
|
1
|
|
|
};
|
|
};
|
|
@@ -45,7 +46,7 @@ severely lacking, and we're pretty naive when we attempt to locate the
|
|
|
executables on our own. You may be well served in specifying the paths
|
|
executables on our own. You may be well served in specifying the paths
|
|
|
to the webdriver in question yourself, if we can't figure it out.
|
|
to the webdriver in question yourself, if we can't figure it out.
|
|
|
|
|
|
|
|
-=attr binary_path
|
|
|
|
|
|
|
+=attr binary
|
|
|
|
|
|
|
|
Optional: specify the path to the executable in question. If you don't
|
|
Optional: specify the path to the executable in question. If you don't
|
|
|
specify anything, we use L<File::Which/which> and take our best guess
|
|
specify anything, we use L<File::Which/which> and take our best guess
|
|
@@ -58,12 +59,6 @@ assume you're running a Remote Webdriver instance.
|
|
|
|
|
|
|
|
=cut
|
|
=cut
|
|
|
|
|
|
|
|
-has 'binary_path' => (
|
|
|
|
|
- is => 'lazy',
|
|
|
|
|
- default => sub { '' },
|
|
|
|
|
- predicate => 1
|
|
|
|
|
-);
|
|
|
|
|
-
|
|
|
|
|
has 'binary_mode' => (
|
|
has 'binary_mode' => (
|
|
|
is => 'lazy',
|
|
is => 'lazy',
|
|
|
init_arg => undef,
|
|
init_arg => undef,
|