How to compare from array to elements in web site

I want to compare array I have with 4 numbers (each one with 4 digits “the end og credit card number”)
In addition I have in the web site a form with some rows indicate the credit cards the user have, in each row there is 4 digits like in my array.

I want to follow the numbers in the site (added picture) and if one of the numbers sis equal to one of the array numbers I will delete it.

Be glad for some help with this. thanks


Get the selector for the numbers and use a loop and use element exists inside that with a dynamic selector on the innertext…pass the currentitem to the selector as variable


I didn’t succeed. this is the selector of one of the numbers (Add in picture) while the idx number is actually present the number in each row (what I add is the number in the 6th row).

Hi @mironb

Use element exist with indicating that element having number in the screen and change it to make it dynamic [ check inner text attrubute/aaname] it would have the text value.

Then if it exists, u can click delete button corresponding to the number using anchor base or using css selector itself.


Kindly show the screenshot of UIExplorer to get the idea of attributes which the element is having?

Thanks & Regards,
Nived N


You shoudl have innertext as well…Open the selector in ui explorer …you cna find the option in top menu…select a selector which changes with changing only the innertext…Use the right top and the center top menu

no idx would be involved


Thank you - Add the screen shot

I hope aaname attribute has the 4 digit number which u need, instead of that fixed value, use the variable which have the 4 digit u need to make it dynamic selector

But this variable is array.
Is there another way to compare ?
I have 4 numbers of credit card I need to compare in the same test.

OK - but the problem I need to “run” 4 times as I have 4 different numbers (with 4 digits each).

For that you can iterate through each number and use each number in selector to verify @mironb


You can use a loop on the array and use element exists inside the loop


Sorry I am new in UiPath
I don’t know how to implement this