Button Problem

Hello,

I am having some issue getting a button code on a website.

I want to press the buttons down bellow but each one in my if conditions.

When i record pressing the button on the web record i get this target for the button:

“”

The problem is that the paramater “tableRow” is dynamic and it’s the only identifier i can find on the recording. Every time i refresh the page the number of tableRow changes.

image

I have inpected the element and this is the HTML code of the button:
For button 1:

Adicionar Ficheiro

For button 2:

Adicionar Ficheiro

Is there anyway to make UIPath trigger the HTLM of the button code since i can identify it by HTLM but not in UIPath?

Best Regards
Ricardo

Hi @RicardoAlves,
Have you checked the parent object if maybe there is something you could use to make it work?
For example for two of your links posted I’ve found this:

2 Likes

Hi Pablito,
webctrl aaname=‘Adicionar Ficheiro’ parentid=‘dt_FormDocs_divForm’ tableRow=‘2’ tag=‘A’ /
webctrl aaname=‘Adicionar Ficheiro’ parentid=‘dt_FormDocs_divForm’ tableRow=‘18’ tag=‘A’ /
This is what i get when i record the first 2 buttons. The parentid is always the same, what changes is the tableRow and that is a dynamic value that always changes when i refresh the page.


This is the html code of the button. I wanted to try to go by the HTML code because i can identify the button by the identifier i selected in red.

Do you know if it’s possible to trigger that HTML code to press the button?

Hmmm I’m no that much into HTML, but you could try make loop and inside the loop with use of Get Attribute activity somehow count how many buttons are listed there, and then press the the one which is needed (like 3rd from the top for example).

1 Like

Do you have any kind of good tuturial of how to use “Get Attribute” so i can see and try to implemente?
(Im kinda new on UIPath and didn’t had used that toll yet)

What I can give you for sure is official documentation:

But will try describe it with my own words too :slight_smile:
So if you will take Get Attribute activity you need to indicate element as well as in normal click button:
image

After selecting it you can choose from popup list which attribute you are interested in:
image

Finally as an output you can have the value of selected attribute:
image

With use of this maybe you will be able to catch some individual values of some attributes in selector which you could use in your case. Eventually you can loop it though set of element. Example:

In this example I was looping through each element in password table to get value of aaname of each. So I’ve got info which square is disabled which is enabled so I could provide proper letter.

2 Likes

Thank you very much. Will try that.

1 Like

Sorry for bother again. Can you please provide the code of that so i can check the code on my UIPath?

Thanks again|

In my case it looks like this:
image
I’m using variable called Id_selector to which there are ascending numbers assigned from the table. The table in my case looks like this:
image
So I know that each element in my password (other words each password letter box) will have Id going like: f0,f1,f2 etc. So I’ve created a table with this, and for each element (row) in table I’m assigning the elements from second column to variable Id_selector and then with use of it I’m getting attribute of each lettex box during loop.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.