How can i remove "idx" attribute from my selector?

Hi All,

While working with selectors, most common issue which i am facing is removing idx attribute.Because its not constant so i have to ignore this attribute.sometimes when i select “class” and “parent class” attributes it is getting disappeared. But most of the cases i couldn’t able to remove this idx attribute.Any easy way to handle this situation?


Thanks in advance

1 Like

Just remove idx from the selector. Normal text deletion.
Or you can just replace 1 with *.

Regards,
Karthik Byggari

i tried by replacing 1 with * also by removing idx attribute like normal text deletion.In this case validation is success on ui explorer but my UI element not getting detected.

Are you trying to scrape data table from a web page?
In this case please update selector. In the second line of your selector just kepp tag attribute and aaname attribute and unselect all attributes.

Regards,
Karthik Byggari

You can find a selector for this using the UiExplorer.
Click Indicate Element - Click the number that you want to capture.Wait for the selector to load.
Click Indicate Anchor - Indicate the text ‘Loyalty Number’ on top of it.

This will give you a selector relative to the text ‘Loyalty Number’. Use this selector to get text. Chances are that it might be unique already. If not, let me know, we might have to dig in a bit deeper.

I tried by using indicate element and indicate anchor as suggested,This is helping me to capture current Loyalty number but when i did new enrollment and when system generats new loyalty Number its not capturing the New Loyalty Number value.I tried to put * also tried by removing Idx field but in this case the ui element not getting recognized.
FYI: I am trying here is Salesforce application…

You should by all means try to avoid idx in either of your selectors (for anchor or element), making the selector unique.
Play around with the properties on the right to see which one makes it unique, until the idx disappears by itself.

1 Like

I tried with diff combinations but no luck…If possiblw can some one provide me some good demo videos on how to handle dynamic selector which includes get attribute activity,so that i will pass get attribute output as a input to dynamic selector?

You might not find anything exactly catering to your scenario on the forum. Might have to read through relevant ones and figure out your solution.

But I am pretty sure there are unique selectors for your elements. I can help you with this if you want. Can you post a screenshot UiExplorer, after selecting the anchor element? and then your target element? Make sure the properties on the attribute pane to the right are visible properly. Focus on the element on the visual tree pane and also on the selector editor pane.

1 Like

At last it worked thanks…

1 Like