Hello,
I have a set of lots of fields (name, birth date, sex…). The only difference in the selectors is just the “idx” indicating the order of such a field:
What could I do in order to get the proper value (just in case other fields are added and then the number of the text previously got does not coincide) ?
Check in the UiPath Explorer to see whether you can grab some other attribute in the selector like aaname or innertext or something else which is easily distinguishable.
If the other attributes are not available then the only choice you are left with is to use the idx attribute dynamically.Then in that case you need to derive a logic to pass the variable value in the idx attribute.
Hi @EngAnalyst,
1.First check in the UI Explorer if there is any attributes like aaname or inner text.
2.If not there make your selector as dynamic, by using like this,
Remove the id number and make it as * EG: id=‘*’.
This makes the selector to select the element with any id value and keep some unique attribute.
I hope this will work,If useful mark it as solution.
Cheers
Vashisht I can not do this since all the fields have the same selector except for the idx number. If I set idx=‘*’ then the robot will not know what is the field I want to get.
@amarasto I have something similar like this:
The only difference in the whole selector is just the idx number.
I am using anchor base (find text position + find element) and it works properly to make a difference between Email and Name. However, i do not know how to get the second field of the first name…
Did you check in UI explorer for some unselected attributes. You will find some attributes which may be unique.
Once try to validate when validated copy paste in notepad and then run.
When not validated check the selector copy paste it again near old one and check what is the difference.
Cheers
Yeah Good i also thought of suggesting the anchor base.
1.You can go to the second field by using the send hotkey activity and keep tab in send hotkey activity.
2.Then use the type into activity then it works.
If you find this useful mark it as solution and close the thread.
Any issues let me know buddy.
Cheers
Vashisht.