How to pass variable to click function

How to pass variable to selectors in click activity.
In aaname , i got aaname = ‘set’ .
Can any one tel me some suggestions.

1 Like

Buddy if your variable is of name
Invariable of type string…with the value
Invariable = “Set”

Then un selectors if you want to pass the variable to a particular attribute…we need to mention like this buddy
aaname = ’ " + Invariable + " ’

Thats all buddy you are done…
Kindly try this and let know buddy
Cheeers @Bakia_Murugesan

1 Like

I tried this too. Still its not working

@Bakia_Murugesan

Could you please take screenshot of your selector and paste here.

No worries…
Can we have a look at your selector once buddy.

That could help us solve the issue buddy
Cheers @Bakia_Murugesan

Below one is actually i got,
Capture1
And am passing variable into selectors. It will look like this
Capture2

@Bakia_Murugesan

In your original selector aaname attribute is not there but you are trying to passing it.

Buddy remove the whole value of id and replace with *
Then when you are getting from a datatable assign it to a variable and then place that variable here in the attribute Value buddy
Like
In_variable = row(0).ToString.Trim

Then in
aaname = ’ " + In_variable + " ’

And try to add as much as attributes innthe selector that could make them more flexible…and can make the bot easy to find the element exactly…and make sure you have made the dynamic Value replaced with *

And try to choose he attributes from the panel at the right top buddy…
Try this and let know buddy @Bakia_Murugesan
Cheers…

yeah i have tried this too. when am giving like this means, Its not clicking

1 Like

Buddy kindly enable the properties in click activity buddy
Simulate click
Cheers @Bakia_Murugesan

Were you able to make a click now Buddy @Bakia_Murugesan

Nope

@Bakia_Murugesan

you can try as below,it might helpful.

  1. Edit the selector and assign it to a variable.
  2. Pass the variable in selector property.

I tried this too. Though its not working

Then print and check the value which your passing.

Hi @Bakia_Murugesan
Use row.item(0).tostring instead of row(0).tostring.

@Bakia_Murugesan

Because the problem is with your selector only. aaname attribute is not there in your original selector.

Could you please click that element and paste selector here. And also it is possible to access that site from my end ?

If possible paste screenshot of Element you are trying to indicate.

I’ll try and let u know

yeah ok