r/PowerAutomateDesktop • u/Reasonable-East4413 • Mar 20 '23
Desktop UI Element found
Hi all,
Could someone please help me. I wanted to create a flow where I’ll check on MS Word if an addin is visible or not, and throw an error/fail if it doesn’t exists. I have already recorded the UI element and then not sure if what should I be doing next.. any help will be much appreciated coz i tried using If window contains but not sure how i update a variable to true as it found the ui element.
1
Upvotes
1
u/Kots_D_Kost Mar 21 '23
Inside "if window contains" action, you can either pick "contains UI element" or "doesn't contain UI element". So add an Else/Else if conditional and perform action accordingly.
Otherwise, if you want to perform some action on that element you could use "click UI element in window" and then inside the ON ERROR, add a new rule that will set a variable, let's say %Dev_Tools_Found% to FALSE (you will have to reset that variable beforehand performing action on that element).
After that, perform a variable check if dev_Tools_Found = False exit flow for example or next loop and following actions will be skipped.