lib/Selenium/Driver/WinApp.pm

filter: Statementstmt 66.6% 20 / 30 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 75.0% 6 / 8 Podpod 100% 1 / 1 totaltotal 54.0% 27 / 50 CC 5 SCAR 25.8
CC
5
Cov
53%
build_spawn_opts
30.0
_driver
2.0
BEGIN
1.0
CRAP 13.2
« lib/Selenium/Subclass.pm ↑ Summary lib/Selenium/Driver/Gecko.pm »
1 package Selenium::Driver::WinApp;
2 1 $Selenium::Driver::WinApp::VERSION = '2.01';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶no warnings 'experimental';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use feature qw/signatures/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Carp qw{confess};
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use File::Which;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 #ABSTRACT: Tell Selenium::Client how to spawn the Windows Application Driver
13  
14  
15 0 ▶sub _driver {
Subroutine _driver: not called CC=1 SCAR=6.9
16 0 return 'WinAppDriver.exe';
17 }
18  
19 0 ▶sub build_spawn_opts ( $class, $object ) {
Subroutine build_spawn_opts: not called CC=5 SCAR=34.0
Pod documented
20 0 $object->{driver_class} = $class;
21 0 ▶ $object->{driver_version} //= '';
Condition0%0/2
$object->{"driver_version"} //= ""
l!l
00
MC/DC0%0/1
$object->{"driver_version"} //= ""
$object->{"driver_version"}
Truth table0%0/2
A
A= $object->{"driver_version"}
Aresult
11
00
22 0 ▶ $object->{log_file} //= "$object->{client_dir}/perl-client/selenium-$object->{port}.log";
Condition0%0/2
$object->{"log_file"} //= qq[$object->{"client_dir"}/perl-client/selenium-$object->{"port"}.log]
l!l
00
MC/DC0%0/1
$object->{"log_file"} //= qq[$object->{"client_dir"}/perl-client/selenium-$object->{"port"}.log]
$object->{"log_file"}
Truth table0%0/2
A
A= $object->{"log_file"}
Aresult
11
00
23 0 $object->{driver_file} = File::Which::which( $class->_driver() );
24 0 ▶ die "Could not find driver!" unless $object->{driver_file};
Branch: 1 branch
BranchTrueFalseTotal
unless $object->{"driver_file"} 0 0 0
25  
26 #XXX appears that escaping from system() does not work correctly on win32 thanks to the join() I have? to do later, sigh
27 0 $object->{driver_file} = qq/"$object->{driver_file}"/;
28  
29 0 my @config = ( $object->{port} );
30  
31 # Build command string
32 $object->{command} //= [
33 $object->{driver_file},
34 0 ▶ @config,
Condition0%0/2
$object->{"command"} //= [$object->{"driver_file"}, @config]
l!l
00
MC/DC0%0/1
$object->{"command"} //= [$object->{"driver_file"}, @config]
$object->{"command"}
Truth table0%0/2
A
A= $object->{"command"}
Aresult
11
00
35 ];
36 0 return $object;
37 }
38  
39 1 1;
40  
41 __END__
« lib/Selenium/Subclass.pm ↑ Summary lib/Selenium/Driver/Gecko.pm »