All pastes #1878561 Raw Edit

Stuff

public text v1 · immutable
#1878561 ·published 2010-06-07 18:20 UTC
rendered paste body
use strict;
use warnings;
use Time::HiRes qw(sleep);
use Test::WWW::Selenium;
use Test::More "no_plan";
use Test::Exception;

my $sel = Test::WWW::Selenium->new( host => "localhost", 
                                    port => 4444, 
                                    browser => "*chrome", 
                                    browser_url => "http://change-this-to-the-site-you-are-testing/" );

$sel->open_ok("/repository.php");
$sel->click_ok("link=My Files");
$sel->wait_for_page_to_load_ok("30000");
$sel->select_frame_ok("repository_tree");
sleep(5);
$sel->click_ok("link=ListTest1");
$sel->wait_for_page_to_load_ok("30000");
$sel->select_frame_ok("relative=up");
$sel->select_frame_ok("repository_edit");
$sel->type_ok("info_name", "ListTest12");
$sel->click_ok("link=Rename");
$sel->wait_for_page_to_load_ok("30000");
ok($sel->get_confirmation() =~ /^Are you sure you want rename this file [\s\S]$/);
$sel->select_frame_ok("relative=up");
sleep(20);
$sel->click_ok("//img[\@onclick='historyDisplay()']");
$sel->wait_for_page_to_load_ok("30000");
$sel->text_is("//div[\@id='messageDiv']/div[3]/table/tbody/tr/td[2]", "The list \"ListTest12\" was modified.");