set up test for breedingmethods brapi call
[sgn.git] / selenium / example.t
blob0abcabf75e241e61f1e7ba8781992650ace7d7a1
1 use Test::More tests=>22;
2 use Test::WWW::Selenium;
3     
4 my $server = $ENV{SELENIUM_TEST_SERVER} || die "Need the ENV SELENIUM_TEST_SERVER set";
5 my $host = $ENV{SELENIUM_HOST} || die "Need the ENV SELENIUM_HOST set";
6 my $browser = $ENV{SELENIUM_BROWSER} || die "Need the ENV SELENIUM_BROWSER set";
8 my $sel = Test::WWW::Selenium->new( host => $host, 
9                                   port => 4444, 
10                                   browser => $browser, 
11                                   browser_url => $server."/content/",
12                                 );
13 @ORGANISM_IDS = ("Nicotiana attenuata","Capsicum annuum", "Solanum lycopersicoides","Solanum neorickii","Solanum lycopersicum", "Datura metel","Solanum melongena");
14 my $TABLEID= "id=xtratbl";
16 #check innerHTML of div when mouseover
18 $sel->start;
19 $sel->open_ok("http://sgn.localhost.localdomain/content/sgn_data.pl");
20 for my $orgid(@ORGANISM_IDS){
21     $sel->mouse_over_ok("id=".$orgid);
22     $sel->text_like($TABLEID,qr/$orgid/,"".$orgid."test");
23     $sel->mouse_out_ok("id=".$orgid);
25 $sel->stop;