Two elements with exact same property, how to recognise

Hi,

I have 2 edit boxes(actually calenders) with exactly the same property. except the aaname(which always changes). Am trying to directly type into the dates to the edit box but due to similar properties, UI path throws the exceptions. How do I handle this issue. I had to remove the date and time text as it will always change. But then it is not able to find the edit box.
1st editbox:


2nd editbox:

Hi

What does the date in the selector refer to? If it’s a default value for that field, what rule does the system use for calculating the default?

There could be a way of creating that changing value within UIPath and then applying it to the selector.

Are you able to get it to recognize one or the other successfully? I’d think you could differentiate them simply by index value (idx=β€˜1’ or idx=β€˜2’) to the last line of the selector if you always want the first of the second that is. Did you check all four levels of the selector in the Selector Editor to make sure they are in fact unable to be differentiated by another attribute?

Its the date in which particular action is done, it will always differ

yes, i can but its not very consistent

It is not consistently finding any edit box or is not consistent on which edit box? If it is selecting one or the other consistently then I still think adding an index value for the first or the second edit box (depending on which you desire to interact with) should be the simplest fix. If it is failing sometimes and succeeding others then you maybe the selector is changing more than you realize or some other issue not selector related is causing it to fail.

@Tyler_Williams,

Could you please help me with how to assign new properties through selectors?

If you are wanting help adding idx=β€˜1’ or idx=β€˜2’ to you selector. Pick whichever fits your need and add it to the last line of your pictured selector before the β€œ/>”

The last line of the selector would be similar to:

<wnd cls='TcxCustomDropDownInnerEdit' idx='1' />

or

<wnd cls='TcxCustomDropDownInnerEdit' idx='2' />

Hope that helps!

3 Likes

Thanks @Tyler_Williams !

I know this post is old but it just saved my life, thank you!