How to manage easily different environments?

Hello,

I’m working on automation between one window application and one website. On my local machine I’m connected with my own credentials on the dev version the website and I’m using a preprod version of the window application.

At the beginning I set credentials as variables in the main activity of my process. A colleague suggested to use a config file (with a json inside it) on the computer itself so my credentials are not versioned in Git and if someone wants to play the script he can easily update the json file with his account and production url and path.

Regarding this example, what is the best to manage this kind of situation ?
Variables ? Config file ? A specific activity ?

Best regards

1 Like

For audit purposes, I would not recommend sharing a file with the credentials. Unless, it’s an application that is shared throughout the department.

It also depends on if this is Attended or Unattended. For attended, you could simply display an input dialogue box to type in the credentials. You can also use the Windows Credential Manager and the activities that can be used to retrieve from it.

For unattended, you would probably have Orchestrator, which can be used to store credentials.

For all other variables, yeah a Config file is the best way. This is because it can give the owner control over how it performs. You can use either an Excel, .json, or other text-based file formats - it really doesn’t matter, but I find Excel is most user-friendly and allows for more organization and descriptions. You would probably want this file in a shared location, so it is not required on the user’s individual computer.

Those are just a few thoughts.

Regards.

1 Like

Thank you for your feedback.

I will use a standard json file, it will be more easy to use than Excel just need a simple text editor.

I tried the “Get credential” activity but I’m not using the orchestrator, so I have an error “Orchestrator information is not available, please check if UiPath Robot Service is started”. Any idea ?

Otherwise I can use input dialog… It’s also a good alternative but before going to that I have an another question. My Windows credentials are linked to a LDAP repository. So credentials are the same to start my Windows OS and to connect to the website that I’m automating. Is there a way to get the Window credentials LDAP and inject them in the website ? I see nothing the Windows Credentials Manager