Add variable in selector


what type of variable is modelName?

Generic Value

i am taking content from excel using for each row

Try: you can convert using convert.ToString(modelName).

i already converted to string also can you check my xaml once ?

OE_Competition Report(Autosaved).xaml (228.6 KB)

Any issue when you are running the workflow?

Yes, am getting below error

1 Like

i will need your excel as well

Try this. Not everything applies to you. But check out the way to enter dynamic selector in the selector field

The issue is not with respect to your selector any more. Please share your excel once and i will try and debug through it

Honda List.xlsx (8.0 KB)
Here you go !
Thanks for your time.

If you looking for the dynamic selector. First assign the whole selector into a variable, and place the variable in the selector field…

H Akil,

I tried your idea its working partially - i tred message box to read the selector its giving correct selector with model name but am getting below error in next activity.

OE_Competition Report(Autosaved).xaml (229.7 KB)


  1. You copy and pasted the code that is why the " " quotes were not correct
  2. The value in your excel is all caps and the one on the web page is propercase
  3. A slight wait for the first box to collapse to be able to select the second one

Hope it helps
Keep Automating

1 Like

Two issues that I came across

  1. Notice the difference in the single quotes that is in the selectors for Div - between the one captured by UiPath and one pasted by you. That was one issue. Correct that and you should be not be getting the Json.Linq error.

  1. Even if you had solved that, the model name in aaname attribute in the selector is in title case, where as your excel has everything in caps. Also there is an extra space after the model name. You can change the case and add a space after the model name like this
    StrConv(row("Model").ToString, VbStrConv.ProperCase) + " "
    or use * in the selector to avoid any characters after the model name.

This should get your issues resolved.

1 Like

Excellent nadim. Real Master :slight_smile:

1 Like

Thanks dude. its working now.


Hi everyone,

You can now define your variables for selectors directly in Studio.

Please check our official documentation here:

As well as this short tutorial on our Forum:

I took the liberty to change the solution flag to this post to let our users know about this feature :slight_smile:
Old solution post is this one.