Selecting a very similar item from a drop down

Hi,

I am trying to select an item from a drop down using a variable value I’ve called from a JSON. The issue I’m facing is that in some instances, there are very minute differences between them.

For example, the value of a paint colour to select is ‘Carbonised Grey’ on the portal, but the json value has ‘Carbonized Grey’ (a Z instead of an S). Is there any way I could essentially make the variable selection ‘fuzzy’ for the select item activity?

I did also try clicking the drop down box to reveal all items and intended on clicking the desired item with a fuzzy click, but the box only registers as one entity to the bot rather than several options.

Alternatively, is there a way I could check the similarity of strings to determine it is correct? Eg: I can scrape the drop down contents and check each row in a datatable against the json variable of pColour to determine which is more similar?

Thanks in advance.

@dr1992

  1. Use get attribute and get the items…which will get all values into variable
  2. Now use fuzzy match to find the match How to compare Strings for Percentage Match using vb.net? - Stack Overflow
  3. Then use the output of fuzzy match as input for select item

Cheers