I am automating a website using Perl WWW::Selenium.
I want to know how can I handle the pop-up window which comes after clicking an upload or download button.
When an upload button is clicked, a dialog window opens to select the files.
When a download button is clicked, a dialog window opens to select the place where file is to be saved.
How the above scenarios can be automated in WWW::Selenium?
CODE
sub import_files()
{
# http://mygengo.com/string/p/<proj_name>-1/admin/languages/import/en
$url = $MYGENGO_STRING_PROJECT_URL . $_[0] . "-1" . $IMPORT_FILES;
$sel->open($url);
$sel->attach_file("class=qq-upload-button string-file-import",
"http://localhost/1.php"); # But this does not open the file browse window
$sel->click("class=qq-upload-button string-file-import");
$sel->wait_for_page_to_load(9000);
}
The upload scenario can be easily solved by using
send_keyscommand