Create selector for changing element

Hi, I have a query that I have an element i.e. a name like (Amit kumar), and it also a link and I wanted to click on that name
But the problem is name is change every time. My selector is not working problem can you tell me the solution.

https://docs.uipath.com/studio/docs/dynamic-selectors

Please refer above link. If the name is known before hand, a variable can be created for that and the variable can be passed to the selector. I hope this resolves the query.

Name is not known I have only
an emp id

@Lakshya_Garg Can you share the selector screenshot

Hi @Lakshya_Garg
Could you please share screenshot of selector u hv used


Here Amit malakar is the link where I have to click

Here, is my selector that I am using where I am making * to amit malakar.

Please help

So one question @Lakshya_Garg

Should you always select 1 st row

Yes , I have

@Lakshya_Garg Is the tile (CSE) besides name changes everytime or will it be same

So one suggestion you could try …is make aaname * and go with any support anchor

Use indicate anchor from uiexplorer and select a field header where it doesn’t change

Yes its changing every time

@Lakshya_Garg Can you check the selector has TD or table row or table col attributes

So username header can u select as an anchor and check @Lakshya_Garg

Element selector changing its position when I am make the dynamic selector.

Did u try with indicate anchor of uiexplorer? @Lakshya_Garg

Not done by ui explorer

Can you please try by indicate Anchor of uiexplorer

Hi @Lakshya_Garg,

aaname is constantly changing and if you do not have this information, you should not choose it.

This is actually something you can figure out by trying and unit testing, but let me make a few suggestions anyway.

  • First, you read all the rows in this table by datascraping, and then you position username as a dynamic selector in the aaname field.

  • You can toggle the selector property by pressing the F4 key and maybe get a more unique value from the selectors.

  • You remove aaname and choose parentclass and change the text after the * to *.

  • As the name changes, you use the repair command, maybe uipath can suggest the most suitable selector for you.

These are the ones that come to mind, but if you ask me, the best way is to read the table first and then use dynamically selector.

Regards,
MY

@Lakshya_Garg Try the below steps

  • Just indicate an element
  • Open the selector in UiExplorer
  • Click on Indicate Anchor at the top and select username as anchor

  • Now, make the aaname as wild card, validate and highlight the selector
1 Like