line |
true |
false |
branch |
130
|
1 |
0 |
if ($options->{'port'}) |
136
|
0 |
1 |
if (my $cookie_file = delete $options->{'cookie_file'}) |
140
|
0 |
1 |
if (my $ignore_ssl_errors = delete $options->{'ignore_ssl_errors'}) |
146
|
0 |
1 |
$^O =~ /mswin/i && $options->{'launch_exe'} =~ /\s/ ? : |
149
|
0 |
1 |
if ($^O =~ /mswin/i) |
162
|
1 |
0 |
unless (defined $options{'port'} and not $options{'pid'}) |
172
|
0 |
1 |
if ($sock) |
183
|
0 |
1 |
unless (exists $options{'autodie'}) |
185
|
1 |
0 |
unless (exists $options{'frames'}) |
188
|
1 |
0 |
unless ($options{'pid'}) |
191
|
1 |
0 |
if (@cmd > 1) { } |
194
|
1 |
0 |
unless $options{'pid'} = open($options{'fh'}, $mode, @cmd) |
199
|
0 |
0 |
unless $options{'pid'} = open($options{'fh'}, $cmd[0]) |
212
|
0 |
0 |
if ($socket) |
217
|
0 |
0 |
if &WWW::Mechanize::PhantomJS::time() - $t < 1 |
243
|
0 |
0 |
if ($@) |
244
|
0 |
0 |
if $options{'kill_pid'} |
320
|
0 |
0 |
if @_ == 2 |
328
|
0 |
0 |
if ('javascript' eq $opt) { } |
409
|
0 |
0 |
unless defined $affirmative |
410
|
0 |
0 |
$affirmative ? : |
491
|
0 |
0 |
if (my $child_out = $_[0]{'fh'}) |
501
|
0 |
0 |
if ($pid) |
564
|
0 |
0 |
if ref $phantom_res eq '' and $phantom_res eq '1' |
574
|
0 |
0 |
unless ($phantom_res->{'status'}) |
621
|
0 |
0 |
'File::Spec'->file_name_is_absolute($htmlfile) ? : |
629
|
0 |
0 |
if ($^O =~ /mswin/i) { } |
636
|
0 |
0 |
if (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') { } |
695
|
0 |
0 |
unless ($options{'data'}) |
819
|
0 |
0 |
if ($self->{'autodie'}) { } |
829
|
0 |
0 |
if ($self->{'autodie'}) { } |
830
|
0 |
0 |
if ($self->status and not $self->status =~ /^2/ and $self->status != 0) |
854
|
0 |
0 |
if $res |
968
|
0 |
0 |
if ('html' eq $format) { } |
|
0 |
0 |
elsif ($format eq 'text') { } |
1007
|
0 |
0 |
if (my($meta) = $self->xpath(q[//meta[translate(@http-equiv,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')="content-type"]], 'first', 1)) |
1009
|
0 |
0 |
if $ct |
1046
|
0 |
0 |
if $base |
1065
|
0 |
0 |
if (my($meta) = $self->xpath(q[//meta[translate(@http-equiv,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')="content-type"]], 'first', 1)) |
1068
|
0 |
0 |
if (not $ct and my $r = $self->response) |
1072
|
0 |
0 |
if defined $ct |
1137
|
0 |
0 |
if ($tag) |
1138
|
0 |
0 |
if (not exists $link_spec{$tag}) { } |
1146
|
0 |
0 |
if ($tag eq 'meta') |
1148
|
0 |
0 |
if ($content =~ /^\d+\s*;\s*url\s*=\s*(\S+)/i) { } |
1150
|
0 |
0 |
unless $url =~ s/^"(.+)"$/$1/ |
1157
|
0 |
0 |
if (defined $url) { } |
1283
|
0 |
0 |
unless $xpath_quote{$1} |
1293
|
0 |
0 |
if (exists $opts{$_}) |
1300
|
0 |
0 |
if ($single and exists $opts{'n'}) |
1304
|
0 |
0 |
if $n ne 'all' |
1323
|
0 |
0 |
if length $op |
1326
|
0 |
0 |
if (exists $opts{$key}) |
1333
|
0 |
0 |
if (my $p = delete $opts{'url'}) |
1337
|
0 |
0 |
if (my $p = delete $opts{'tag'}) |
1340
|
0 |
0 |
if (my $p = delete $opts{'tag_regex'}) |
1345
|
0 |
0 |
exists $link_spec{$_} ? : |
1347
|
0 |
0 |
if (@full) { } |
1357
|
0 |
0 |
if (keys %opts) |
1368
|
0 |
0 |
if ($one) |
1369
|
0 |
0 |
if (0 == @res) |
1370
|
0 |
0 |
if ($single) |
1371
|
0 |
0 |
if (1 < @res) |
1380
|
0 |
0 |
if ($n eq 'all') |
1404
|
0 |
0 |
if 'all' eq ($opts{'n'} || '') |
1405
|
0 |
0 |
if (my $link = $self->find_link_dom('frames', 0, %opts)) { } |
1434
|
0 |
0 |
if wantarray |
1457
|
0 |
0 |
if wantarray |
1477
|
0 |
0 |
if (@_ == 2) { } |
1501
|
0 |
0 |
unless ($doc->{'__path'}) |
1518
|
0 |
0 |
unless ($just_parent) |
1525
|
0 |
0 |
if ('html' ne $tag and '' ne $tag) |
1535
|
0 |
0 |
if ($body) |
1644
|
0 |
0 |
if ('ARRAY' ne (ref $query || '')) |
1648
|
0 |
0 |
unless (exists $options{'frames'}) |
1665
|
0 |
0 |
unless (exists $options{'all'} or $return_first_element) |
1666
|
0 |
0 |
if defined wantarray and not wantarray |
1677
|
0 |
0 |
if ($options{'document'}) |
1703
|
0 |
0 |
if ($options{'node'}) { } |
1718
|
0 |
0 |
unless (@found) |
1743
|
0 |
0 |
if ($options{'frames'} and not $options{'node'}) |
1763
|
0 |
0 |
if (not $zero_allowed and @res == 0) |
1766
|
0 |
0 |
if (not $two_allowed and @res > 1) |
1772
|
0 |
0 |
$return_first_element ? : |
1795
|
0 |
0 |
if ('ARRAY' ne (ref $query || '')) |
1861
|
0 |
0 |
if (not defined $name) { } |
|
0 |
0 |
elsif (ref $name and &blessed($name) and $name->can('click')) { } |
|
0 |
0 |
elsif (ref $name eq 'HASH') { } |
1871
|
0 |
0 |
if (exists $options{'name'}) |
1876
|
0 |
0 |
if ($options{'name'} eq '') |
1884
|
0 |
0 |
if ($options{'dom'}) { } |
1893
|
0 |
0 |
if (defined wantarray) |
1911
|
0 |
0 |
if (exists $options{$meth}) |
1917
|
0 |
0 |
unless $method |
1925
|
0 |
0 |
unless (grep {exists $options->{$_};} 'single', 'one', 'maybe', 'all', 'any') |
1974
|
0 |
0 |
if (exists $options{'input'}) { } |
|
0 |
0 |
elsif (exists $options{'name'}) { } |
|
0 |
0 |
elsif (exists $options{'value'}) { } |
|
0 |
0 |
elsif (exists $options{'id'}) { } |
|
0 |
0 |
elsif (exists $options{'number'}) { } |
1998
|
0 |
0 |
if ($node) { } |
2028
|
0 |
0 |
unless $self->{'current_form'} |
2041
|
0 |
0 |
unless ($focus) |
2073
|
0 |
0 |
if ($type = $f->get_attribute('type') || '') |
2164
|
0 |
0 |
if (ref $fields[0] eq 'HASH') |
2201
|
0 |
0 |
wantarray ? : |
2262
|
0 |
0 |
if (@_ == 3) { } |
2294
|
0 |
0 |
if ($name =~ s/^\^//) { } |
|
0 |
0 |
elsif ($name =~ s/^#//) { } |
|
0 |
0 |
elsif ($name =~ s/^\.//) { } |
2301
|
0 |
0 |
if (&blessed($name)) { } |
2332
|
0 |
0 |
unless ref $pre |
2334
|
0 |
0 |
unless ref $post |
2337
|
0 |
0 |
if ($fields[0]) { } |
2339
|
0 |
0 |
if ($set_value) |
2346
|
0 |
0 |
$value ? : |
2365
|
0 |
0 |
unless defined wantarray |
2369
|
0 |
0 |
if ('SELECT' eq uc $tag) { } |
2372
|
0 |
0 |
if (wantarray) { } |
2401
|
0 |
0 |
if ($dom_form) { } |
2465
|
0 |
0 |
unless ($form) |
2466
|
0 |
0 |
if ($fields = delete $options{'with_fields'}) { } |
2469
|
0 |
0 |
unless ($form) |
2479
|
0 |
0 |
unless ($form) |
2486
|
0 |
0 |
if ($options{'button'}) { } |
2514
|
0 |
0 |
unless ($f) |
2526
|
0 |
0 |
if (ref $v) |
2528
|
0 |
0 |
unless $num == 1 |
2551
|
0 |
0 |
ref $spec ? : |
2554
|
0 |
0 |
if (not ref $spec || $spec =~ /\D/ and $spec == 1) |
2561
|
0 |
0 |
if (not grep({ref $_;} @spec)) { } |
2570
|
0 |
0 |
ref $_ ? : |
2655
|
0 |
0 |
if &blessed($e) and $e->isa('Selenium::Remote::WebElement') |
2659
|
0 |
0 |
unless $res->{'id'} |
2698
|
0 |
0 |
if (scalar keys %$rect) |
2769
|
0 |
0 |
unless my $element = delete $options{'element'} |
2838
|
0 |
0 |
unless ($outname) |
2855
|
0 |
0 |
if ($wantresult) |
2856
|
0 |
0 |
unless open my $fh, '<', $outname |
2864
|
0 |
0 |
unless unlink $_ |
2948
|
0 |
0 |
if ($self->{'report_js_errors'}) |
2949
|
0 |
0 |
if (my(@errors) = $self->js_errors) |
2962
|
0 |
0 |
@{$_->{'trace'};} ? : |
|
0 |
0 |
@{$_->{'trace'};} && $_->{'trace'}[-1]{'function'} ? : |