Identifying the duplicates in dropdown list

I am trying to validate the Coins that they are valid and no duplicates

Hi @phumudzo.mukhathi and welcome to our community!
You can use the ‘Count Elements’ action.
Look at this sample photo (I used Xpath to search elements in the menu with the value of ‘Red’):

  • In my case this path //div[6]//option points to the menu options and adding [. = 'Red'] pointed to elements with the name Red.

Let me know if this solution helps you :slight_smile:

Thank you that is working, But i wanted to fail the test is the count of duplicate is more than two

Hi @phumudzo.mukhathi,
You can add a validation to make sure the count is less then or equals to 1.

It worked thanks. I really appreciate your help :slightly_smiling_face: