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"; |
374611f4 |
8 | use Test::WWW::Selenium::Catalyst 'TestApp', |
9 | -selenium_args => '-singleWindow'; |
4f6d213e |
10 | |
11 | diag("You need to have firefox-bin in your path for this to work!"); |
12 | |
13 | my $sel = Test::WWW::Selenium::Catalyst->start({browser => '*firefox'}); |
14 | |
15 | $sel->open_ok('/'); |
16 | $sel->text_is("link=Click here", "Click here"); |
17 | $sel->click_ok("link=Click here"); |
e39d6317 |
18 | $sel->wait_for_page_to_load_ok("30000", 'wait'); |
4f6d213e |
19 | for my $i (1..10){ |
20 | $sel->open_ok("/words/$i"); |
21 | $sel->is_text_present_ok( |
22 | qq{Here you'll find all things "words" printed $i time(s)!}); |
23 | |
24 | for my $j (1..$i){ |
25 | $sel->is_text_present_ok("$j: foo bar baz bat qux quux"); |
26 | } |
27 | } |