How to type into 'File Name' in the file explorer

I need to save a file I am downloading to a specific path.

I already have the path as a string, it’s just a matter of being able to type it into the ‘Save As’ window.

I have also changed my Chrome settings to save a file upon download so after I click ‘Download’, this window shows:

I’m having issues typing into the ‘File Name’ text bar using the RPA.FileSystem library.

If source is browser you can also set path with browser keywords. RPA.FileSystem does not have any keywords for typing in dialogs it can move files which are already present. If you need to use dialog box you can interact with it using RPA.Windows library.

Simple example:

*** Settings ***
Documentation       Set path and save or open file using
...                 Windows dialog

Library             RPA.Windows


*** Tasks ***
Minimal task
    Set Filepath In Save As Dialog


*** Keywords ***
Control Save As Windows Dialog
    Control Window    name:"Save As"

Set File Name For Save As Window
    [Arguments]    ${filename}=examplee.txt
    Set Value    id:1001    ${filename}    enter=True

Set Filepath In Save As Dialog
    Control Save As Windows Dialog
    Set File Name For Save As Window    myfilepath.txt
1 Like

@UmFpdm8 I apologize for adding to this thread but could you explain why you used id:1001?

It was because I had lot of windows open and this seemed to work reliably. Its not working for you? I think there can be case that there are more applications with that id, then you must set anchor or find some other reliable way.

No it works, I was just confused as to why you used that ID, thank you for the fast response!

1 Like

Hello, I have been looking for two days how to do the opposite, how to load… If anyone can give me a hand I would greatly appreciate it.

Example from above works for other dialogs, you just need to adjust the selectors.