All pastes #1878556 Raw Edit

Stuff

public text v1 · immutable
#1878556 ·published 2010-06-07 18:15 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");
$sel->click_ok("Bs_Tree_0_e_4_caption2");
$sel->wait_for_page_to_load_ok("30000");
$sel->select_frame_ok("relative=up");
$sel->select_frame_ok("repository_edit");
$sel->click_ok("link=Delete");
$sel->wait_for_page_to_load_ok("30000");
ok($sel->get_confirmation() =~ /^Warning, the timeline items associated with the files will be deleted as well\.
Are you sure you want to delete this file [\s\S]$/);
sleep(10);
$sel->select_frame_ok("relative=up");
$sel->click_ok("//img[\@onclick='historyDisplay()']");
$sel->wait_for_page_to_load_ok("30000");
$sel->is_text_present_ok("he announcement \"AnnonceTest2\" was deleted.");