I'm a novice user of PowerAutomate with no HTML background. I've been playing around with PA Desktop's record tool and was able to build a flow that achieves what I want to do satisfactorily. The problem is that it is extremely fragile. If I make any changes to the URL of the site I'm working it at all, every single one of my actions needs to be edited to show them where the UI element is again using the Add UI Element tool. I'll give some more specifics below but the general question is, how do I write the command in such a way that PA can still find the same UI element in the same place on the page even if the URL has been slightly altered? The beginning of the URL will always be the same, and the tab will always have the same name, but the site uses the URL to store various filter changes I need to be able to use.
I'm trying to create a hotkey-activated flow that will add a specific set of observation fields to an observation on iNaturalist. I will manually open a modal on the site and navigate to an observation that I want to run the flow on.
I've got the hotkey-activation working with a loop starting with "wait for shortcut key"; the next step is to attach to a running instance of Microsoft Edge titled Identify · iNaturalist. This stores a variable "Browser". Then it needs to press the "Annotation" button, go to the "Observation Fields" text box, type some text, select the corresponding span below, go down to the selection box below, make a selection, and press the add button. The name and position of each of those UI elements is the same regardless of the URL, but PowerAutomate throws an error if I make any change to the URL, because it isn't finding the UI Element I've told it to look for using the Add UI Element tool.
How am I supposed to write the names of these things such that it will always know where they are? I mean that in both ways. I wouldn't know how to write the correct address for the UI element in HTML, but I also don't even see how you could write a custom address in PA at all. The edit function for a Press Button action, eg, only allows me to select UI elements from those I've already added, and I can't change them in any way.
Thank you for any help you can give
Solved! Go to Solution.
Hi @Megachile ,
It seems to be an interesting scenario. Could you please share the JS codes, to help others find them when they need?
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Keep up to date with current events and community announcements in the Power Automate community.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Check out the latest Community Blog from the community!