Commit | Line | Data |
4f6d213e |
1 | #!/usr/bin/perl |
2 | # 01-live.t |
3 | # Copyright (c) 2006 Jonathan Rockway <jrockway@cpan.org> |
4 | |
5 | use Test::More tests => 79; |
6 | use FindBin; |
7 | use lib "$FindBin::Bin/lib"; |
8 | use Test::WWW::Selenium::Catalyst 'TestApp'; |
9 | |
10 | diag("You need to have firefox-bin in your path for this to work!"); |
11 | |
12 | my $sel = Test::WWW::Selenium::Catalyst->start({browser => '*firefox'}); |
13 | |
14 | $sel->open_ok('/'); |
15 | $sel->text_is("link=Click here", "Click here"); |
16 | $sel->click_ok("link=Click here"); |
17 | $sel->wait_for_page_to_load_ok("30000"); |
18 | for my $i (1..10){ |
19 | $sel->open_ok("/words/$i"); |
20 | $sel->is_text_present_ok( |
21 | qq{Here you'll find all things "words" printed $i time(s)!}); |
22 | |
23 | for my $j (1..$i){ |
24 | $sel->is_text_present_ok("$j: foo bar baz bat qux quux"); |
25 | } |
26 | } |