Get Attribute "idx" from element

Is it possible to get the idx attribute from an element?

I’m not using idx to identify the element as it changes however I need to capture the textboxes next to this one which has a unique ID. When I use Get Attribute on the element (which exists) passing in “idx” it gives me an error “Attribute not supported by current UINode”

Hi Dom
give tab for each textboxes without any selector and get the appropriate result

Can you please tell me the target application ?

It’s an oracle forms application. The only text boxes with identifying IDs are the far left ones. I’m using the selector for the far left one and then trying to get ones directly right of that one (4 of them)

Hey, in case you are still interested you can use this: yourElement.Selector.GetTag(yourElement.Selector.GetTagCount-1).GetAttributeValue(“idx”).ToString
yourElement = UiPath.Core.UiElement - returned from FindElement activity or similar
.GetTag(yourElement.Selector.GetTagCount-1)=returns the last tag (last <> row from the selector)

Hope it helps;)


Hi, where do i need to use this piece of code.

Hi, you can use FindElement activity to get the element and then just use Assign activity with the code to get the idx attribute from the selector of given element

This is brilliant! It worked for me. Thank you very much :slight_smile:

1 Like