cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
as300d
Regular Visitor

UI element (text box) not found

I’m using Power Automate Desktop to populate data into fields in a program from a spreadsheet. I’ve created UI elements for all required fields. I’m able to run the flow successfully, but when I close and reopen my interface, it no longer can find my UI elements. I don’t want to create new UI elements every time I open the program, is there a fix for this?

7 REPLIES 7
ChristianAbata
Super User
Super User

hi @as300d  that is because the web developer add some javascript to generate ramdom Ids on the elements. So the obky wayt to get those elements is using javascript. 

 

There is an action on power automate desktop called. Run a javascript query



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

So you are saying whoever developed the program I’m using used JavaScript to randomize these fields? Power Automate won’t work with this program without JavaScript?

VJR
Super User
Super User

Hi @as300d 

 

I have moved your post from Building Flows to a forum specific to Power Automate Desktop.

 

Can you share some details of what kind of Ui elements are they.

Also I assume you are referring to Web application and not a windows one.

Also did anything change recently like - new PAD version, etc?

as300d
Regular Visitor

Hi @VJR, thanks for the reply. The application I’m using is not web based, but does run using Java. Best I can explain is it’s an inventory system for a telecom company, it has text fields in which I can update with text data. The UI elements I’m having trouble with are those text boxes. I’m using “populate text field in window”. I can open PA and choose new UI elements (overriding the previous) and it will work, but I feel there should be a way around this. I’ve looked at the selector builder and notice there is always some value different from a previous UI I’ve chosen, even though it’s the same text field in the application. 

" I’ve looked at the selector builder and notice there is always some value different from a previous UI I’ve chosen, even though it’s the same text field in the application. "

Herein lies the solution, you will need a dynamic selector.

You can post the screenshot of the before and after as there's nothing confidential within this code, would help solve your issue.

 

Like this...

 

Screenshot 2022-03-11 162028.png

as300d
Regular Visitor

Hi @UK_Mike, I'll attach screenshots below, but I'll also attach the code related to them as I think it may be easier to analyze that.

Original selector: > frame[Name="Granite Inventory v16.1.0.00 : P2811433 -> ise"] > root_pane > layered_pane > panel > split_pane > panel:eq(1) > panel:eq(2) > page_tab_list > page_tab[Name="Shelf"] > split_pane > panel:eq(0) > panel:eq(0) > text

as300d_1-1647016540999.png

 

New Selector: > frame[Name="Granite Inventory v16.1.0.00 : P2811433 -> ise"] > root_pane > layered_pane > panel > split_pane > panel:eq(1) > panel:eq(1) > page_tab_list > page_tab[Name="Shelf"] > split_pane > panel:eq(0) > panel:eq(0) > text

as300d_2-1647016706526.png

 

panel:eq(1) > panel:eq(2)

panel:eq(1) > panel:eq(1)

 

Thats the only difference I can see in both of those, try deselecting these as they " may " not be needed, see what happens.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,282)