As you may know, the latest version of Firefox has a JavaScript .pdf viewer.
This can cause issues when you want to download a .pdf file.
To eliminate problems with the Firefox .pdf viewer in Watir, disable "pdfjs" in
Firefox preferences, like so:
profile['pdfjs.disabled'] = true
Here it is in a complete Firefox profile set up for downloading, which you must
create before instantiating the Watir browser:
download_directory = "your_download_path"
download_directory.gsub!("/", "\\") if
Selenium::WebDriver::Platform.windows?
profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.dir'] = download_directory
profile['browser.download.folderList'] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = "application/pdf"
browser = Watir::Browser.new :ff, :profile => profile
I hope this saves some people a bit of research.
Lonny Eachus
============
[email protected]
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.