Set UI Framework

excel
activities
studio

#1

I have an excel application that I need to automatized, from some reason the studio recognize the cells only in UI Framework: UIA. I can select the element but when I run the workflow, it tells me that the selector is not correct: “Cannot find the UI element corresponding to this selector”.
How can I set the selectors? So they can work.


#2

Hi @nemtutruben, have you checked if all your packages are updated (ctr+P)? Have you tested if the selector is defined differently in any way, depending e.g. on how you obtain it? Have you tried using wildcards?


#3

@PAD The problem is that, I have macros in the excel, its not an usually excel page, it is an excel application.
I have buttons created with macros an other components. And that I want to know, how can make the selector that it would be valid.
I have all packages and updates up to date.


#4

What is the current selector? I’ve encountered this exact problem before, just checked and I see that using the index of the button worked for me.


#5

@evangemert this is the selector error: "Click 'shape Rectangle' : Cannot find the UI element corresponding to this selector: <wnd app='excel.exe' cls='XLMAIN' title='XXAGC10.xlsm - Excel' /><uia cls='EXCEL7' name='XXAGC10.xlsm' /><uia name='Rectangle' role='shape' />",


#6

I’m guessing there are multiple buttons in the sheet, so it currently can’t identify which button to click. Can you check with the UI Explorer if the buttons have unique indexes? For example, the selector that worked for me was:

<uia idx=‘2’ name=‘Rectangle’ role=‘shape’ />


#7

@evangemert I dont have an idx, i have looked but I didn’t see one


#8

@evangemert it’s not only the buttons that UIPATH cant recognize, it is also the checkboxes


#9

Weird… I’m not sure then how to fix it, sorry :frowning: Maybe one of the forum guru’s will have a solution.


#10

Can you upload the workflow here so that i can have a better understanding.


#11

@Sarath it is not actually an workflow it was just testing to see if UIPATH activities recognized all elements on the page


#12

There is something with excel macros, some macros I can click but others I cant


#13

I feel, if it is macro you can instead call the macros directly instead of clicking the buttons. But if the macro you are referring to is a ‘Form’ like structure then it would be difficult. Is your button within the excel sheet or in a form.


#14

@Sarath I don’t think they are in a form, it is an excel application. I have found all the macros in “Code” section.
You said that I can call directly the macro, how I can do this?


#15

@nemtutruben I have attached a sample workflow to call Macros… try and let me know if this works for you.

Call_Macro.zip (12.7 KB)