Here are the shortcuts you need:
- Zoom in: CTRL++
- Zoom out: CTRL+-
- Toggle between Fit Width and Fit Page: CTRL+\
- Rotate clockwise: CTRL+]
- Rotate counter-clockwise: CTRL+[
- Download PDF: CTRL+S
- Print PDF: CTRL+P
- Scroll one page up: PgUp
- Scroll one page down: PgDn
- Search Document: CTRL+F
Hi, if I left-click a link to download a PDF, chrome often prompts with a "Do you want to download?" or something similar, and I need to left-click a second time "Yes" or "Download" or something.
About a year ago, I discovered a keyboard shortcut where, if I hold a key, then left-click, it won't prompt the question, but it just immediately downloads the PDF to my Downloads folder.
My question — I can't seem to repeat this single key+left click, and I can't remember what key I pressed. Does anyone know what is the key?
I need to download hundreds of PDFs (nothing illegal) and would like to avoid the question prompt and second click if at all possible, would save me literally hours. Thanks for your help!
Here are the shortcuts you need:
- Zoom in: CTRL++
- Zoom out: CTRL+-
- Toggle between Fit Width and Fit Page: CTRL+\
- Rotate clockwise: CTRL+]
- Rotate counter-clockwise: CTRL+[
- Download PDF: CTRL+S
- Print PDF: CTRL+P
- Scroll one page up: PgUp
- Scroll one page down: PgDn
- Search Document: CTRL+F
I've tried some common hotkeys, you can zoom in with Ctrl++ (either regular one or the one on numpad), zoom out with Ctrl+-, and return zoom to initial value with Ctrl+0.
Videos
You can't click that area with webdriver unfortunately. Instead, you can set the file's downloaded folder and navigate to it.
String filePath = "file:///Users/username/Desktop/file.pdf";
webDriver.get(filePath);
In chrome, you can use control+j to bring up downloaded files and then tab down to the recently downloaded file.
You can restore the old Alt-click "Save Link As" functionality in Firefox:
Open a new tab in Firefox. In the Firefox address space, type:
about:config
Click the "I'll be careful, I promise" prompt. Type
browser.altClickSave
in the Search space. Double-click on the browser.altClickSave line to change the value from false to true. Close the about:config tab.
Now when you Alt-click on a valid download link it will open the Save As explorer screen. All you need to do is set the correct location and press Enter. Once you set the download location, if you are downloading a lot of files into the same location, all you need to do is press enter. This will greatly speed up your download process.
I did the above process in Windows 7. It should also work in Ubuntu.
The other answers are correct for Firefox.
For Chrome it's even easier:
Option+Click (Windows: Alt+Click) saves the link-target to the download folder.