On Sun, Mar 13, 2011 at 2:01 PM, maga <chat...@gmail.com> wrote: > > So, how can I specify a path to save the archive and how to manage > saving flow(something like autoit for windows)? >
First of all, if no JavaScript support is required, you should be able to download the file with a HTTP library (like Net::HTTP in stdlib) - you don't need watir-webdriver for this at all. Otherwise, this isn't currently possible with the HtmlUnit driver + the remote server. You can do it with a local Firefox like so: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.dir'] = "/path/to/downloads" profile['browser.download.folderList'] = 2 profile['browser.helperApps.neverAsk.saveToDisk'] = "application/zip" browser = Watir::Browser.new(:firefox, :profile => profile) or with a remote Firefox: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.dir'] = "/path/to/downloads" # refers to a path on the machine where the selenium server is running profile['browser.download.folderList'] = 2 profile['browser.helperApps.neverAsk.saveToDisk'] = "application/zip" capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile) browser = Watir::Browser.new(:remote, :desired_capabilities => capabilities) That's your options at the moment. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com