Remove value from Multi value text box

Hi All,

I have a text box where multiple value can be stored. I have to read the first group i.e Australia in my case and then check second group if available .same way how many groups are available I have to check ,then I have the value (U.K) in my variable which i have to validate with available groups in the text box and if it matches I have to removed the UK group from the text box. How can I achieve this?

So here’s a thought/work process:

  1. What you want to achieve is not validate each and every tag/value but just to cross the required value (in this case UK)
  2. The tags/values in the text box will have more or less similar HTML structure with the “name” being variable. Use UI explorer to verify this.
  3. Prepare the selector that fits all these tags/values except the “name” part.
  4. Pass your variable (containing the values to be crossed) to this selector.
  5. This is selector for your Click activity to cross the needed tag/value.

Hope this helps.

Not able to understand and relate with my case

@shashank_dullu Try below process

  • First Select only Australia and see how the selector coming
  • If the selector contains aaname (which looks like aaname = Australia)then this flow would become easy
  • Assume selector has aaname then instead of Australia which is a static value you can pass the variable every time which have the values (UK, Italy etc) that you were mentioning

Only tag=‘DIV’ is static nothing else

As u can see in attached screenshot, we have multiple groups names in groups text box.
I wanted to click on Cross icon based on group. here group name is dynamic. we will pass a group name via a variable.
Suppose if i get request to remove ‘UK’ group then i need to click on cross icon which is present right after the ‘UK’ and vise versa for other groups. But i didn’t find any static values in selectors to combine and find group and click on cross icon.

Selector for group name in text box:

image

Selector to identify the cross icon:

image

UK_Element_Indication
Cross_Icon_Element indication

with this it would be more clear ?

@shashank_dullu If you see in the selector (first screenshot) it has something called aaname which is what I was mentioning in the previous post. This would help for this process

Pass the aaname through variable meaning, you was mentioning that the group names (UK, australia etc)were in a variable. Pass that variable as a value to the aaname. Check this for UK if it works you can implement the same for others

Also remove parentid from the selector if possible. This might change some times

Below link is for how to pass variables int the selector

@shashank_dullu Above post is to check the city name present in that group or not

Now, to remove it from the group first indicate on the cross mark. Open the selector in UiExplorer at the top you can see indicate anchor

Capture

Click on indicate anchor and indicate on the group name (UK or Australia etc). Make sure selector has aaname = UK . See it was able to remove UK. If this works then pass the variable instead of static value UK so that every time it will remove the value that you pass through the variable