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("/home.php"); $sel->click_ok("link=My Files"); $sel->wait_for_page_to_load_ok("30000"); $sel->click_ok("link=Batch Upload"); $sel->wait_for_page_to_load_ok("30000"); $sel->select_frame_ok("repository_edit"); $sel->type_ok("info_file1", "C:\\Documents and Settings\\tpontette.IMPACT-DEV-01\\Desktop\\Samples\\Image_format_PNG.png"); $sel->click_ok("link=Save"); $sel->wait_for_page_to_load_ok("30000"); sleep(30); $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("The picture \"Image_format_PNG\" was successfully added to your environment");