change method call to subroutine call; Sel's docs are WRONG here
[catagits/Test-WWW-Selenium-Catalyst.git] / t / 01-live.t
CommitLineData
4f6d213e 1#!/usr/bin/perl
2# 01-live.t
3# Copyright (c) 2006 Jonathan Rockway <jrockway@cpan.org>
4
5use Test::More tests => 79;
6use FindBin;
7use lib "$FindBin::Bin/lib";
8use Test::WWW::Selenium::Catalyst 'TestApp';
9
10diag("You need to have firefox-bin in your path for this to work!");
11
12my $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");
e39d6317 17$sel->wait_for_page_to_load_ok("30000", 'wait');
4f6d213e 18for 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}