line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Selenium::Chrome; |
2
|
|
|
|
|
|
|
$Selenium::Chrome::VERSION = '1.49'; |
3
|
1
|
|
|
1
|
|
443
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Use ChromeDriver without a Selenium server |
7
|
1
|
|
|
1
|
|
520
|
use Moo; |
|
1
|
|
|
|
|
14210
|
|
|
1
|
|
|
|
|
4
|
|
8
|
1
|
|
|
1
|
|
1764
|
use Selenium::CanStartBinary::FindBinary qw/coerce_simple_binary/; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
273
|
|
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__ |