Merge commit 'pianohacker-koha/prefs-submit' into master
[koha.git] / selenium / PERL / Members / Searchmember.pl
1 use strict;
2 use warnings;
3 use Time::HiRes qw(sleep);
4 use Test::WWW::Selenium;
5 use Test::More "no_plan";
6 use Test::Exception;
7
8 my $sel = Test::WWW::Selenium->new( host => "localhost", 
9                                     port => 4444, 
10                                     browser => "*chrome", 
11                                     browser_url => "http://change-this-to-the-site-you-are-testing/" );
12
13 $sel->open_ok("/cgi-bin/koha/members/members-home.pl");
14 $sel->type_ok("searchmember", "Cocteau");
15 $sel->click_ok("//input[\@value='Search']");
16 $sel->wait_for_page_to_load_ok("30000");
17 $sel->text_is("searchheader", "Results 1 to 1 of 1 found for 'Cocteau'");
18 $sel->type_ok("searchmember", "123141");
19 $sel->select_ok("searchorderby", "label=Cardnumber");
20 $sel->click_ok("//input[\@value='Search']");
21 $sel->wait_for_page_to_load_ok("30000");
22 $sel->text_is("searchheader", "Results 1 to 1 of 1 found for '123141'");
23 $sel->click_ok("link=Cocteau, Jean");
24 $sel->wait_for_page_to_load_ok("30000");
25 $sel->is_text_present_ok("");