I am developing an automation that captures the information base and uses the ‘Browse’ function to open the Chrome.exe document download page. I have a function that performs a concatenation as follows:
However, when I use the ‘Type into’ function in the ‘Simulate’ option, the path is inserted (I cannot use Chrome IO, as Google opens the download page itself). Then, when I simulate clicking to save the document, it is saved in the ‘Downloads’ folder and not the temporary folder. If I simulate the ‘Backspace’ keyboard shortcut or use a hardware event in ‘Type into’, it works normally. Has anyone else had this problem?
if you hover while indicating over the type into field you would see two different selectors with slight variation..only one of it works for changing the path and all..so re indicate it properly
Also instead of simulate send window messages is a bette option on it
Thank you very much for the welcome, @Anil_G, and thank you for your quick response.
I already tried that, but it didn’t work. It’s as if something is forcing the download to the “Downloads” folder. I tested it manually, and when I download the document manually, it works normally.
However, when the robot is run via AnyDesk, it doesn’t work. On my local machine, it works, but the difference is that in the machine settings, I set the Temp folder as the default download folder. On the virtual machine, unfortunately, I can’t do the same, as there are several robots running different processes. So I’m trying to enter the path directly in the “File name” field, but without success.
In addition, when I use the SendWindowMessages option, the program writes letter by letter, and in this case I need the path to be entered all at once.
Set the full path to clipboard: Use the Set To Clipboard activity
tempFolderDocument = String.Format(“{0}{1}”, System.IO.Path.GetTempPath(), CurrentRow(“Document name”).ToString)
Send Hotkey activity with Ctrl + V to paste the path into the Chrome “Save As” dialog
Click activity to press the Save button
If method 1 didnt work then try method 2 as suggested by @ashokkarale :
Use set Type Into property Input Method = Hardware Events.
Set DelayBetweenKeys = 0 to speed up typing.
Method 3:
Use Wait for Download activity to get the file path.
Then use Move File activity to relocate it to your temp folder.
please try all 3 methods and let us know your result.
Thank you all for your time and helpful suggestions!
After testing the three proposed methods, I found that a combination approach worked best in my scenario.
I used an AutoHotKey ‘Backspace’ to clear the file name field in the Chrome ‘Save as’ dialogue,
Then I used a Type Into activity with the Simulate option enabled to input the full path.
This combination allowed the dialogue to correctly recognise and save the file in the intended temporary folder.
This worked even under the limitations of the virtual machine, where I can’t change Chrome’s default download folder because it’s shared across multiple robots.
As a follow-up question:
Is there an argument or Chrome launch setting that I can use to open the download dialog directly in the %TEMP% path without changing the default configuration for all users?