History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-63
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Bret Pettichord
Votes: 2
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

Save file download

Created: 03/May/06 12:29 PM   Updated: 10/Jun/08 02:12 PM
Component/s: Save File
Affects Version/s: 1.4, 1.4.1
Fix Version/s: 1.6.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Dave Burt responding to Michael Müller:
> In a script in clicking the download link. Then a Windows window appears
> with the button Open, Save and Cancel. I´d like to click the save
> button. How can I do that?
>
> The Next window opening is the window to specify the location to save
> the file. How can I set the Path to that window?

You can do this stuff with AutoIt:

require 'win32ole'
autoit = WIN32OLE.new("AutoItX3.Control")
autoit.WinWait("File Download", "Do you want to open or save", 3)
autoit.ControlClick("File Download", "Do you want to open or save", "&Save")
autoit.WinWait("Save As", "Save &in", 3)
autoit.ControlSetText("Save As", "Save &in", "Edit1", "path\\filename.ext")
autoit.ControlClick("Save As", "Save &in", "&Save")

See AutoIt3 reference here:
http://www.autoitscript.com/autoit3/docs/functions.htm

Note to Bret Pettichord: This is something you'd need to take care of before you
remove AutoIt from version 1.5.

Originally reported on Rubyforge: http://rubyforge.org/tracker/index.php?func=detail&aid=2467&group_id=104&atid=490

 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 11/Sep/06 12:46 PM
Possible additional to contrib.