Hi do I check a box based on a value (which is stored in a variable)

I have a variable named location, and I have the following web page

when location = ‘Amazonas’

my bot is supposed to check amazonas

and when location =“Cera” my bot is supposed to check Cera

Can you please help me on how to do this

Thank You in advance!

in general we can dynamize selectors as by

check boxes can occur in many variations. So in you individual we would nee to know more on the element structures.

Can you please right click on amazonas, select inspect element and share some more details from the Browser f12 Webtools. Thanks

Hello @ice_cream,

You should find a selector that gives the name of city, and replace this city by a variable in that way: attribute = {{myvar}}. In this way you are doing the selector dynamic :slight_smile: