line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Selenium::Util; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$WWW::Selenium::Util::VERSION = '1.36'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
# ABSTRACT: Utility code to help test using Selenium |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
2675
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
100
|
|
8
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
28
|
|
|
3
|
|
|
|
|
90
|
|
9
|
3
|
|
|
3
|
|
5642
|
use IO::Socket; |
|
3
|
|
|
|
|
163175
|
|
|
3
|
|
|
|
|
414
|
|
10
|
3
|
|
|
3
|
|
3229
|
use base 'Exporter'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
1142
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw(server_is_running); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub server_is_running { |
15
|
3
|
|
50
|
3
|
1
|
1225
|
my $host = $ENV{SRC_HOST} || shift || 'localhost'; |
16
|
3
|
|
50
|
|
|
288
|
my $port = $ENV{SRC_PORT} || shift || 4444; |
17
|
|
|
|
|
|
|
|
18
|
3
|
50
|
|
|
|
43
|
return ($host, $port) if IO::Socket::INET->new( |
19
|
|
|
|
|
|
|
PeerAddr => $host, |
20
|
|
|
|
|
|
|
PeerPort => $port, |
21
|
|
|
|
|
|
|
); |
22
|
3
|
|
|
|
|
7266
|
return; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |