Pass variable to selector in click activity

Hello,

Please help me on the below dynamic selector to resolve the issue.

selector:

I need to pass variable in"InnerText" which is varying from each region. and I am able to get only “(FR)” county codes from previous activity.

https://docs.uipath.com/studio/standalone/2023.10/user-guide/dynamic-selectors

Use </> format button from editor when sharing code snippets

when creating a variable as described in above link, it can be adapted to

innertext='*{{YourVar}}*'

We recommend to provide also a valid default value, so we can also validate the selector

@ppr
Below are the selectors and I am able to get only country codes (DE) or (FR) from previous activty.

<webctrl shadowhostid='countriesDropDown' tag='DIV' innertext='    Germany                     (DE)            ' parentid='countriesDropDown' />

<webctrl shadowhostid='countriesDropDown' tag='DIV' innertext='    France                     (FR)            ' parentid='countriesDropDown' />

we cannot refer to the details,

  • what was done,
  • what are the structure details

Whenever you need more specific help, please share complete info in advance with us. Thanks for support

Below are the selectors & I am able to get only the country codes(DE) from previous activity.Based on the region it has to select country codes.


<webctrl shadowhostid='countriesDropDown' tag='DIV' innertext='    Germany                     (DE)            ' parentid='countriesDropDown' />

<webctrl shadowhostid='countriesDropDown' tag='DIV' innertext='    France                     (FR)            ' parentid='countriesDropDown' />

Hi @POOJA_MARUTI_BALIGIDE

Please write selector as
for example if you’re getting country code in a variable countryCode=“(DE)”

"<webctrl shadowhostid='countriesDropDown' tag='DIV' innertext='*"+countryCode+"*' parentid='countriesDropDown' />"

@adiijaiin ,
I have tried this , but its not working.
if the Country Code is (DE), it has to click (Germany (DE)) from drop-down.
image