lib/Selenium/Driver/Auto.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 47.5% 19 / 40 CC 5 SCAR 28.4
CC
5
Cov
41%
build_spawn_opts
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 17.1
« lib/Selenium/Client/Driver.pm ↑ Summary lib/Selenium/Subclass.pm »
1 package Selenium::Driver::Auto;
2 1 $Selenium::Driver::Auto::VERSION = '2.01';
3 #ABSTRACT: Automatically choose the best driver available for your browser choice
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Carp qw{confess};
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use File::Which;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # Abstract: Automatically figure out which driver you want
12  
13  
14 0 ▶sub build_spawn_opts {
Subroutine build_spawn_opts: not called CC=5 SCAR=34.0
Pod documented
15  
16 # Uses object call syntax
17 0 my ( undef, $object ) = @_;
18  
19 0 ▶ if ( $object->{browser} eq 'firefox' ) {
Branch: 4 branches
BranchTrueFalseTotal
if ($object->{'browser'} eq 'firefox') { } 0 0 0
elsif ($object->{'browser'} eq 'chrome') { } 0 0 0
elsif ($object->{'browser'} eq 'MicrosoftEdge') { } 0 0 0
elsif ($object->{'browser'} eq 'safari') { } 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 1;
40  
41 __END__
« lib/Selenium/Client/Driver.pm ↑ Summary lib/Selenium/Subclass.pm »