Issue in selection from dropdown on web

Hello team,
I am facing issue in selecting particular values from dropdown. There is exact match between input and drop down value still bot is getting failed to select values.
We have comma separated values as an input and some of the values are getting selected from selection dropdown. Robot is failing for some even after matching with the input.

Please let me know solution asap.

HI,

For now, can you check if option contains any white spaces?

Or can you share screenshot of the site and/or you workflow?

Regards,

Hi @Yoichi

Thanks for replied… We can’t shared the flow.

Yes, i checked white space. white space is contains at start for every values. but issue is occurring only for some dropdown values which are completely matched with input data values.

if i used click activity and targeting the particular value then it’s working but when i am doing click activity by dynamically then issue occuring.

HI,

Do you have any error message to click it? Is there any information about closest match?

Regards,

What activity do you use for selecting the value?

The select item activity is not compatible with all sorts of drop down input types, especially those custom made.

Example: a control that looks like a regular drop down might just be an input filed with an arrow button next to it. Clicking the button sends a http request loading the potential values for the drop-down.

So using the select activity will fail since it is either an invalid control, or it does not contain the values ‘yet’ to find.

Drop-downs can be tricky, sometimes you need to rely on more regular point and click activities to get the values.


Another common issue with drop downs might be options that contain special characters. For example wanting to find ‘Bee & Bob’ most likely is coded as ‘Bee & Bob’.
Your selectors should reflect this.

error:- Value for property [Target.strict selector] is not a valid xml syntax

HI,

Does the option string contains special character such as ' (Single quote)?
If so, can you try to replace it with *character like yourString.Replace("'","*") ?

Regards,

Hi @Jeroen_van_Loon

I am using click activity dynamically for dropdown selection.

Suppose in the input data there are 20 values are present then bot has selecting first 10 values on Web app and after that bot is getting failed when selecting 11th no. values.

Also i compared 11th number values with input data value both are same.

Yes @Yoichi

Value contains special character ‘&’. but some records contains different type of special character.

I am using click activity by dynamically. how i can use your expression(yourString.Replace(“'”,“*”)) for multiple values in the strict selector.

Can you try as the following?

 yourString = System.Text.RegularExpressions.Regex.Replace(yourString,"['&]","*")

Please add character which you want replace inside [ and ]

Regards,

I’ll try this & will let you know if it’s working.

Thanks @Yoichi … working fine. Issue was occured because of ‘&’ character is present in the value.

But in case if we we don’t know which special character will be there in values. then in that case which expression should need to use?

Because there are millions of records present and it’s not possible to identify manually every record. so, if there is any ascii character or special character is present in that case value should be get select from drop-down.

If you have any solution or expression for this case let me know. That will be very much helpful for us.

Hi,

How about the following pattern? This expression replaces all the character except word characters and white space.

System.Text.RegularExpressions.Regex.Replace(yourString,"[^\w\s]","*")

Regards,

Thanks @Yoichi … I will put this expression.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.