3 use Test::More tests=>4;
4 use Test::WWW::Selenium;
6 my $server = $ENV{SELENIUM_TEST_SERVER} || die "Need the ENV SELENIUM_TEST_SERVER set";
7 my $host = $ENV{SELENIUM_HOST} || die "Need the ENV SELENIUM_HOST set";
8 my $browser = $ENV{SELENIUM_BROWSER} || die "Need the ENV SELENIUM_BROWSER set";
10 my $s = Test::WWW::Selenium->new(
14 browser_url => $server."/image/index.pl?image_id=1",
17 $s->open_ok($server."/image/index.pl?image_id=1");
19 sleep(4); # wait for the page to load completely (AJAX actions)
20 my $source = $s->get_html_source();
21 my $body_text = $s->get_body_text();
23 like($body_text, qr/SGN Image/, "String match on page");
24 like($source, qr/<img src=/, "Image tag string present");
25 like($body_text, qr/Image Description/, "Input field match");