Selector as variable

Hi,

I have a selector like this:

and I try to replace the id with a string variable in which I can have 1, 2, 3 or … at the end.

I change it to:

where NewText is a string variable, eg. “bookedQtyId3”

But it return error saying that the UI element not found. Did I miss anything in my syntax ?

Thanks
Snowman

@Snowman

Could you please paste screen shot of your selector here. I can’t see any selector in above post.

Thanks a lot for your prompt response, and attached is the screen shot.
It works when the selector is:

But when I change it to the one as attached, it does not work…

It works when the selector is:

…Just don’t know why in my previous post, all the copy and paste of the selector doesn’t show up : (

image

@Snowman,

I understand your point. can you please do below step you will get the solution.

  1. Please delete the code inside edit attributes inside Selector Editior. and Click okay.
  2. Please paste this code inside the select and click okay. Don’t miss any characters
    "webctrl = id='"+text+"' tag='INPUT'"
    image
  3. Run your bot. then it will work.

Thanks,
Arunachalam.

3 Likes

Hi @Snowman

In your selector I see that you have “&quot” instead of double quotation. Remove these &quot word from the selector and replace them with the double quotation.
It should look like
"webctrl = id='"+text+"' tag='Input'"

When updating this selector, don’t open the selector editor. Go to the properties of the activity, and under the selector text box (without opening the editor), select all and remove what is existing and add the new selector as above.

It will work…

Let know whether it helps

1 Like

Hi @Snowman,

1 Like

Dear all,

Yeah!!! It works !

Thanks a lot

2 Likes

@Snowman,

you are welcome. is there anything else your facing problem. if no please make as a solution.

Thanks,
Arunachalam.

Sure, and marked 3… but just found out that I can only mark once :thinking:

Anyway, thank you @Arunachalam , @Pablito , and @Lahiru.Fernando

1 Like

@Snowman,

Haha. You are welcome again :grinning:

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