File Coverage

blib/lib/Selenium/Chrome.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod n/a
total 16 21 76.1


line stmt bran cond sub pod time code
1             package Selenium::Chrome;
2             $Selenium::Chrome::VERSION = '1.50';
3 3     3   273777 use strict;
  3         7  
  3         116  
4 3     3   18 use warnings;
  3         6  
  3         190  
5              
6             # ABSTRACT: Use ChromeDriver without a Selenium server
7 3     3   1286 use Moo;
  3         22306  
  3         18  
8 3     3   5612 use Selenium::CanStartBinary::FindBinary qw/coerce_simple_binary/;
  3         11  
  3         855  
9             extends 'Selenium::Remote::Driver';
10              
11              
12             has '+browser_name' => (
13             is => 'ro',
14             default => sub { 'chrome' }
15             );
16              
17              
18             has 'binary' => (
19             is => 'lazy',
20             coerce => \&coerce_simple_binary,
21             default => sub { 'chromedriver' },
22             predicate => 1
23             );
24              
25              
26             has 'binary_port' => (
27             is => 'lazy',
28             default => sub { 9515 }
29             );
30              
31             has '_binary_args' => (
32             is => 'lazy',
33             builder => sub {
34 0     0     my ($self) = @_;
35              
36 0           my $context = $self->wd_context_prefix;
37 0           $context =~ s{^/}{};
38              
39 0           return ' --port=' . $self->port . ' --url-base=' . $context . ' ';
40             }
41             );
42              
43             with 'Selenium::CanStartBinary';
44              
45              
46             1;
47              
48             __END__