line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Selenium::Remote::Finders; |
2
|
|
|
|
|
|
|
$Selenium::Remote::Finders::VERSION = '1.49'; |
3
|
14
|
|
|
14
|
|
9146
|
use strict; |
|
14
|
|
|
|
|
38
|
|
|
14
|
|
|
|
|
505
|
|
4
|
14
|
|
|
14
|
|
89
|
use warnings; |
|
14
|
|
|
|
|
32
|
|
|
14
|
|
|
|
|
442
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Handle construction of generic parameter finders |
7
|
14
|
|
|
14
|
|
81
|
use Try::Tiny; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
1085
|
|
8
|
14
|
|
|
14
|
|
108
|
use Carp qw/carp/; |
|
14
|
|
|
|
|
39
|
|
|
14
|
|
|
|
|
770
|
|
9
|
14
|
|
|
14
|
|
108
|
use Moo::Role; |
|
14
|
|
|
|
|
48
|
|
|
14
|
|
|
|
|
205
|
|
10
|
14
|
|
|
14
|
|
9530
|
use namespace::clean; |
|
14
|
|
|
|
|
71401
|
|
|
14
|
|
|
|
|
145
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _build_find_by { |
14
|
110
|
|
|
110
|
|
293
|
my ( $self, $by ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
return sub { |
17
|
20
|
|
|
20
|
|
17886
|
my ( $driver, $locator ) = @_; |
18
|
20
|
|
|
|
|
49
|
my $strategy = $by; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return try { |
21
|
20
|
|
|
20
|
|
978
|
return $driver->find_element( $locator, $strategy ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
catch { |
24
|
10
|
|
|
10
|
|
1378
|
carp $_; |
25
|
10
|
|
|
|
|
517
|
return 0; |
26
|
20
|
|
|
|
|
146
|
}; |
27
|
|
|
|
|
|
|
} |
28
|
110
|
|
|
|
|
525
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |