line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Selenium::PhantomJS; |
2
|
|
|
|
|
|
|
$Selenium::PhantomJS::VERSION = '1.49'; |
3
|
1
|
|
|
1
|
|
463
|
use strict; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
23
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Use GhostDriver without a Selenium server |
7
|
1
|
|
|
1
|
|
6
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
293
|
use Selenium::CanStartBinary::FindBinary qw/coerce_simple_binary/; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
206
|
|
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__ |