We’ve found the object repo a really useful feature and it’s helped us expand our reuse first approach however we’re struggling to find a way to dynamically set the URL of the Browser or FilePath of an application when using the Use Application/Browser activity with an application from the Object Repo.
What we would like to be able to do is set the value of the URL or filepath by using a variable or argument but it appears we can only hardcode a string in these fields as any value we input has double quotes added at runtime.
The only way we’ve found so far that comes close to working is to pull in the application from the Object repo and then unlink it so that we can add a variable. This gives us a degree of reuse but means that if we make any updates to the UI Descriptor it won’t get picked up by any activities where we have unlinked from the Object Repo.
Is there any way we can set URLs or Filepaths in the applications in the Object Repo dynamically and for the descriptor in the Use Application/Browser to remain linked to the Object Repo
You are correct that it is not currently possible to write a variable in the url field once the object is in the object repository
But, it is possible to have a variabile there if the url field is a variable before you link the “use app browser” to the object repository
So, you need to have an “use app browser” with url as in_URL and then link it to OR
Thanks for coming back on this and for the suggestion. This is something we already tried but it doesn’t work for us as UiPath adds quotes to the variable name and at runtime it takes the variable as the url. Essentially it tries to launch “in_url” instead of the value we assigned to in_url.
Do you have an example you can share where this solution works please?
Thanks for this @Pablito. I can see in this that the variable is able to be used without delinking.
Just as a confirmation I think the difference between how you have added the screen to the Object Repo and how I have done it is that I didn’t add it from an existing Use Application/Browser that was in a sequence but just added a descriptor in the Object repo. Whereas I think from what you’re saying you added the screen to the repo via the the menu option in the Use application/browser activity.
From now on we’ll just create a use application/browser and link to the repo from there. I’ve just tried it that way and it looks to give us the ability to use variables without delinking from the repo.
@Pablito can you provide more clarity on how to include this URL as a variable before adding it to the repo. Also, what packages do I need in order to view your example you provided in the initial topic?
Look like the only way to have dynamic URL (URL as a variable) without unlinking/relinking (a lot of rework) is to erase all the hardcoded browser URL from all the screens in the Object Repo. After that, we’ll just need to use Go to URL activity in the InitAllApplication workflow inside Use Application/Browser. This assume all selectors are the same, just the URL is different.
I’m trying to follow along here to get this to work with the ACME Calculate Client Security Hash exercise from the Advanced Developer training, and it seems much more difficult than it should be.
So, I did what @Pablito mentioned. I edited my Work Item Details descriptor to have an empty URL field.
Then, I went to my project files that use this screen and inputted the URL into the specific properties for my Use Application/Browser activity.
This works, but my issue with this is that it is not reliable. Let’s say someone clicks the Descriptor for the screen to edit it. They open it up, see that there is no URL and change it; then they realize their mistake, go back and delete it. Or even let’s say they don’t change it at all the first time; they just click OK and move on. At this point, we need to re-enter ALL the custom URLs for these other files because the “update” in OR has cleared the URLs for these activities since they are linked!
Also, I just had to update one of the objects in my repository for the Work Item Details page, and sure enough, now I need to go through and update the Browser URLs for the components that use the Work Item Details page. Just decided to put the URL in a variable so it’s easier to update every time this happens. Is there any other solution to this that doesn’t involve opening the specific object file and editing the code within it?
You’re right @Joe_Matuch, The folder names are not intuitive. You need to identify the folders. Also, there should be an easier way to handle the URL as a variable. Hope Uipath will fix this bug in coming versions. My answer was just a workaround to solve the problem as of now.