Condition Coverage

blib/lib/WWW/Mechanize/PhantomJS.pm
Criterion Covered Total %
condition 8 183 4.3


and 3 conditions

line !l l&&!r l&&r condition
146 1 0 0 $^O =~ /mswin/i && $options->{'launch_exe'} =~ /\s/
162 1 0 0 defined $options{'port'} and not $options{'pid'}
564 0 0 0 ref $phantom_res eq '' and $phantom_res eq '1'
636 0 0 0 0 + $res->headers->header_field_names and [$res->headers->header_field_names]->[0] ne 'x-www-mechanize-phantomjs-fake-success' || $self->uri ne 'about:blank'
830 0 0 0 $self->status and not $self->status =~ /^2/
0 0 0 $self->status and not $self->status =~ /^2/ and $self->status != 0
1068 0 0 0 not $ct and my $r = $self->response
1092 0 0 0 defined $self->ct && $self->ct eq 'text/html'
1300 0 0 0 $single and exists $opts{'n'}
1525 0 0 0 'html' ne $tag and '' ne $tag
1666 0 0 0 defined wantarray and not wantarray
1743 0 0 0 $options{'frames'} and not $options{'node'}
1763 0 0 0 not $zero_allowed and @res == 0
1766 0 0 0 not $two_allowed and @res > 1
1861 0 0 0 ref $name and &blessed($name)
0 0 0 ref $name and &blessed($name) and $name->can('click')
2554 0 0 0 not ref $spec || $spec =~ /\D/ and $spec == 1
2655 0 0 0 &blessed($e) and $e->isa('Selenium::Remote::WebElement')
2962 0 0 0 @{$_->{'trace'};} && $_->{'trace'}[-1]{'function'}

or 2 conditions

line l !l condition
119 0 1 $options->{'log'} ||= 'OFF'
121 0 1 $ENV{'PHANTOMJS_EXE'} || 'phantomjs'
125 0 1 $options->{'launch_arg'} ||= []
126 0 1 $options->{'phantomjs_arg'} ||= []
204 0 0 $options{'wait'} || 20
467 0 0 $cmds->{'phantomExecute'} ||= {'method', 'POST', 'url', 'session/:sessionId/phantom/execute'}
964 0 0 $options{'format'} ||= 'html'
965 0 0 delete $options{'format'} || 'html'
1303 0 0 delete $opts{'n'} || 1
1404 0 0 $opts{'n'} || ''
1644 0 0 ref $query || ''
1686 0 0 $doc->{'__path'} ||= []
1768 0 0 $_->get_text || ''
1795 0 0 ref $query || ''
1872 0 0 $options{'name'} || ''
2064 0 0 shift() || \*STDOUT
2067 0 0 $form->get_attribute('name') || ''
2073 0 0 $f->get_attribute('type') || ''
2077 0 0 $f->get_attribute('name') || ''
2474 0 0 delete $options{'fields'} || {}
2487 0 0 $options{'x'} || 0
0 0 $options{'y'} || 0
2640 0 0 $self->{'driver'}{'commands'}{'switchToParentFrame'} ||= {'method', 'POST', 'url', 'session/:sessionId/frame/parent'}
2696 0 0 $rect ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
121 0 1 0 $options->{'launch_exe'} ||= $ENV{'PHANTOMJS_EXE'} || 'phantomjs'
124 0 1 0 $options->{'launch_ghostdir'} ||= $ghostdir_default
236 0 0 0 $options{'driver'} ||= 'Selenium::Remote::Driver'->new('port', $options{'port'}, 'remote_server_addr', $localhost, 'auto_close', 0, 'error_handler', sub { local(@CARP_NOT) = (@CARP_NOT, ref $_[0], 'Try::Tiny'); croak($_[1]); } )
284 0 0 0 $self->{'phantomjs_version'} ||= do { my $version = `$self->{'launch_exe'} --version`; $version =~ s/\s+//g; $version }
301 0 0 0 $self->{'ghostdriver_version'} ||= do { $self->eval_in_phantomjs('return ghostdriver.version') }
636 0 0 0 [$res->headers->header_field_names]->[0] ne 'x-www-mechanize-phantomjs-fake-success' || $self->uri ne 'about:blank'
832 0 0 0 $self->response('headers', 0)->message || sprintf('Got status code %d', $self->status)
1047 0 0 0 $base ||= $self->uri
1299 0 0 0 delete $opts{'one'} || $single
1320 0 0 0 $lefthand{$lvalue} || '@' . $lvalue
1656 0 0 0 $single || $first || $maybe || $any
1657 0 0 0 $options{'user_info'} ||= join('|', @$query)
1660 0 0 0 $single || $first
1661 0 0 0 $single || $maybe
1665 0 0 0 exists $options{'all'} or $return_first_element
1683 0 0 0 $options{'document'} || $self->document
1799 0 0 0 $options{'user_info'} ||= 'id ' . join(' or ', map({"'${_}'";} @$query)) . ' found'
1913 0 0 0 $rename{$meth} || $meth
1993 0 0 0 $node ||= $self->xpath($xpath, 'node', $self->current_form, 'single', 1, 'user_message', $user_message)
2325 0 0 0 delete $options{'pre'} || $self->{'pre_value'}
2326 0 0 0 delete $options{'post'} || $self->{'post_value'}
2400 0 0 0 $dom_form ||= $self->current_form
2550 0 0 0 $spec ||= $self->{'frames'}
2552 0 0 0 $document ||= $self->document
2554 0 0 0 ref $spec || $spec =~ /\D/
2657 0 0 0 $e->{'WINDOW'} || $e->{'ELEMENT'}