I am currently working on a flow in which clicking a button labeled “Search” opens a new tab containing a PDF document. I would like to save this PDF to a specific local directory instead of the default Downloads folder.
To achieve this, I am using the following commands:
robot.keyPress(KeyEvent.VK_CONTROL)
robot.keyPress(KeyEvent.VK_S)
robot.keyRelease(KeyEvent.VK_CONTROL)
robot.keyRelease(KeyEvent.VK_S)
robot.keyPress(KeyEvent.VK_ENTER)
However, despite having configured a specific path for downloads, the PDF is still being saved in the Downloads folder.
Could anyone please provide guidance on how to ensure that the PDF is downloaded to my designated local directory? Your assistance would be greatly appreciated.
Thank you in advance for your help.