File Coverage

blib/lib/Selenium/PhantomJS.pm
Criterion Covered Total %
statement 12 14 85.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod n/a
total 16 19 84.2


line stmt bran cond sub pod time code
1             package Selenium::PhantomJS;
2             $Selenium::PhantomJS::VERSION = '1.47';
3 1     1   388 use strict;
  1         2  
  1         25  
4 1     1   5 use warnings;
  1         1  
  1         22  
5              
6             # ABSTRACT: Use GhostDriver without a Selenium server
7 1     1   3 use Moo;
  1         2  
  1         51  
8 1     1   358 use Selenium::CanStartBinary::FindBinary qw/coerce_simple_binary/;
  1         2  
  1         248  
9             extends 'Selenium::Remote::Driver';
10              
11              
12             has '+browser_name' => (
13             is => 'ro',
14             default => sub { 'phantomjs' }
15             );
16              
17              
18             has 'binary' => (
19             is => 'lazy',
20             coerce => \&coerce_simple_binary,
21             default => sub { 'phantomjs' },
22             predicate => 1
23             );
24              
25              
26             has 'binary_port' => (
27             is => 'lazy',
28             default => sub { 8910 }
29             );
30              
31             has '_binary_args' => (
32             is => 'lazy',
33             builder => sub {
34 0     0     my ($self) = @_;
35              
36 0           return ' --webdriver=127.0.0.1:' . $self->port;
37             }
38             );
39              
40             with 'Selenium::CanStartBinary';
41              
42              
43             1;
44              
45             __END__