Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Handling Save Dialog Box

by monkster (Sexton)
on Aug 19, 2008 at 09:24 UTC ( #705157=note: print w/ replies, xml ) Need Help??


in reply to Re: Handling Save Dialog Box
in thread Handling Save Dialog Box

This is a sample code of what I am attempting.

me::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://download.co +m/" ); $sel->open_ok("/2000-2001_4-0.html"); $sel->click_ok("link=AVG Anti-Virus Free Edition"); $sel->wait_for_page_to_load_ok("30000"); $sel->click_ok("link=Download Now"); $sel->wait_for_page_to_load_ok("30000");
After I click 'Download Now', a dialog box pops-up asking me the location where I need to save the file (.exe in the above example). Could you please tell me if I can give the location also through script itself so as to eliminate user interaction..


Comment on Re^2: Handling Save Dialog Box
Download Code
Re^3: Handling Save Dialog Box
by Anonymous Monk on Aug 19, 2008 at 11:18 UTC
    Could you please tell me if I can give the location also through script itself so as to eliminate user interaction..

    Why not check http://selenium-rc.openqa.org/?

    See I can't interact with a popup dialog. My test stops in its tracks!

    You can, but only if the dialog is an alert or confirmation dialog. Other special dialogs can't be dismissed by javascript, and thus currently cannot be interacted with. These include the "Save File", "Remember this Password" (Firefox), and modal (IE) dialogs. When they appear, Selenium can only wring its hands in despair.
Re^3: Handling Save Dialog Box
by roboticus (Canon) on Aug 19, 2008 at 12:28 UTC
    monkster:

    If you can't talk to the dialog box using normal methods, you might be able to send a list of keypress events to the application to set the filename and press the OK button. ...just a thought...

    ...roboticus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://705157]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-09-01 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls