cancel
Showing results for 
Search instead for 
Did you mean: 

Directory is not working

Ace_RigorSanto1
Level 2

Hi all,

Could you please assist me? I'm experiencing difficulty saving a file in my created folder. I'm uncertain as to why it isn't functioning correctly. Here's the scenario: the bot is attempting to save a file, and a pop-up appears prompting the user to select the save location. The bot successfully inputs or renames the file using this format: "[input file directory]Timesheet Hours from [format start date] to [format end date].xlsx". However, upon clicking the save button in the pop-up, the file isn't saved to the intended directory and instead is saved in the documents folder.

Thank you for your help.



------------------------------
Ace Rigor Santos
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Ace, 

Every now and then, I encounter the same behavior you described. What I can infer is that certain "Save As" popup windows vary, and the automation approach should align with the specific characteristics of each popup. Ideally, the popup window would permit saving files in the manner you're attempting, by sending the full path using the 'Write Stage' method. Based on what I've observed, your 'Save As' popup appears to default to the Documents Folder or possibly displays the last-used folder where you saved a file, explaining why the 'Documents' folder is displayed.

14134.jpg

Having said that, I'll reccommend some approaches that could solve your problem.

  1. Instead of using the 'Write Stage', utilize a 'Navigate Stage' with the action 'Global Send Keys' or 'Global Send Keys Events', using an interval of 0.3, and test it. Sometimes, if it's too fast, it doesn't write well, so you have to give some time to type the text correctly. Some elements require the event that 'Someone is typing' (this behavior is more common on webpages). If you can't see those actions on the navigate stage, re-spy using another mode like AA or UIA. I've worked with those with these pop-ups and found them reliable.

  2. Split the path, folder, and file name. You need to automate the folder path (where you see the arrow) and send the full path of the folder, and then write the file name. Remember if write stages doesnt work, use Surface Automation (mimic that someone is typing or clicking)

If you found it useful, please mark it as 'Best Answer' 🙂

Regards



------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte
America/Santiago
------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte

View answer in original post

1 REPLY 1

Hi Ace, 

Every now and then, I encounter the same behavior you described. What I can infer is that certain "Save As" popup windows vary, and the automation approach should align with the specific characteristics of each popup. Ideally, the popup window would permit saving files in the manner you're attempting, by sending the full path using the 'Write Stage' method. Based on what I've observed, your 'Save As' popup appears to default to the Documents Folder or possibly displays the last-used folder where you saved a file, explaining why the 'Documents' folder is displayed.

14134.jpg

Having said that, I'll reccommend some approaches that could solve your problem.

  1. Instead of using the 'Write Stage', utilize a 'Navigate Stage' with the action 'Global Send Keys' or 'Global Send Keys Events', using an interval of 0.3, and test it. Sometimes, if it's too fast, it doesn't write well, so you have to give some time to type the text correctly. Some elements require the event that 'Someone is typing' (this behavior is more common on webpages). If you can't see those actions on the navigate stage, re-spy using another mode like AA or UIA. I've worked with those with these pop-ups and found them reliable.

  2. Split the path, folder, and file name. You need to automate the folder path (where you see the arrow) and send the full path of the folder, and then write the file name. Remember if write stages doesnt work, use Surface Automation (mimic that someone is typing or clicking)

If you found it useful, please mark it as 'Best Answer' 🙂

Regards



------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte
America/Santiago
------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte