| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Selenium::Driver::Auto; |
|
2
|
|
|
|
|
|
|
$Selenium::Driver::Auto::VERSION = '2.01'; |
|
3
|
|
|
|
|
|
|
#ABSTRACT: Automatically choose the best driver available for your browser choice |
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
202149
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
63
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
103
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
14
|
use Carp qw{confess}; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
107
|
|
|
9
|
1
|
|
|
1
|
|
609
|
use File::Which; |
|
|
1
|
|
|
|
|
1649
|
|
|
|
1
|
|
|
|
|
197
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Abstract: Automatically figure out which driver you want |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub build_spawn_opts { |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# Uses object call syntax |
|
17
|
0
|
|
|
0
|
1
|
|
my ( undef, $object ) = @_; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
if ( $object->{browser} eq 'firefox' ) { |
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
require Selenium::Driver::Gecko; |
|
21
|
0
|
|
|
|
|
|
return Selenium::Driver::Gecko->build_spawn_opts($object); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
elsif ( $object->{browser} eq 'chrome' ) { |
|
24
|
0
|
|
|
|
|
|
require Selenium::Driver::Chrome; |
|
25
|
0
|
|
|
|
|
|
return Selenium::Driver::Chrome->build_spawn_opts($object); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
elsif ( $object->{browser} eq 'MicrosoftEdge' ) { |
|
28
|
0
|
|
|
|
|
|
require Selenium::Driver::Edge; |
|
29
|
0
|
|
|
|
|
|
return Selenium::Driver::Edge->build_spawn_opts($object); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
elsif ( $object->{browser} eq 'safari' ) { |
|
32
|
0
|
|
|
|
|
|
require Selenium::Driver::Safari; |
|
33
|
0
|
|
|
|
|
|
return Selenium::Driver::Safari->build_spawn_opts($object); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
0
|
|
|
|
|
|
require Selenium::Driver::SeleniumHQ::Jar; |
|
36
|
0
|
|
|
|
|
|
return Selenium::Driver::SeleniumHQ::Jar->build_spawn_opts($object); |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=pod |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=encoding UTF-8 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 NAME |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Selenium::Driver::Auto - Automatically choose the best driver available for your browser choice |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 VERSION |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
version 2.01 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SUBROUTINES |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 build_spawn_opts($class,$object) |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Builds a command string which can run the driver binary. |
|
60
|
|
|
|
|
|
|
All driver classes must build this. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Please see those modules/websites for more information related to this module. |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L<Selenium::Client|Selenium::Client> |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website |
|
77
|
|
|
|
|
|
|
L<https://github.com/troglodyne-internet-widgets/selenium-client-perl/issues> |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
|
80
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
|
81
|
|
|
|
|
|
|
feature. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHORS |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Current Maintainers: |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=over 4 |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
George S. Baugh <george@troglodyne.net> |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Copyright (c) 2024 Troglodyne LLC |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
|
101
|
|
|
|
|
|
|
of this software and associated documentation files (the "Software"), to deal |
|
102
|
|
|
|
|
|
|
in the Software without restriction, including without limitation the rights |
|
103
|
|
|
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
104
|
|
|
|
|
|
|
copies of the Software, and to permit persons to whom the Software is |
|
105
|
|
|
|
|
|
|
furnished to do so, subject to the following conditions: |
|
106
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all |
|
107
|
|
|
|
|
|
|
copies or substantial portions of the Software. |
|
108
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
109
|
|
|
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
110
|
|
|
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
111
|
|
|
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
112
|
|
|
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
113
|
|
|
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
114
|
|
|
|
|
|
|
SOFTWARE. |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |