Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1903944862
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 27 lines (22 sloc) 0.648 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
use lib 'lib';

BEGIN {
    unless ($ENV{SRC_LIVE_TESTS}) {
        plan skip_all => 'not running live interweb tests';
exit;
    }

    plan tests => 3;
    use_ok 'Test::WWW::Selenium';
}

my $tws = Test::WWW::Selenium->new(browser_url => 'http://example.com');
isa_ok $tws, 'Test::WWW::Selenium';

$tws->open('/');
$tws->title_is('Example Web Page');
$tws->click_ok("name=RFC 2606");
$tws->wait_for_page_to_load;
$tws->text_like(qr/Reserved Top Level DNS Names/);
my $location = $tws->get_location;
is $location, 'http://www.rfc-editor.org/rfc/rfc2606.txt', 'get_location is absolute';
Something went wrong with that request. Please try again.