How to click the hyperlink based on variable that i set in selector

Hi All,

I have a screen where i need to click one or two records hyperlink but based on the variable that i set it.

For example;
The web page have two rows of data with hyperlink
Column A
Link 1
Link 2

Whenever i run the automation, this page will read the variable and will click either Link 1 or Link 2 based on the variable ive set in.

The problem is, i dont know how to do it.
I try to set selector like this
, but Activity Click still hit an error. i try to do some suggestion from forum , and still havent find the solution.

did you print out the value of strLimitCd and made sure its either “Link 1” or “Link 2”?

can you also capture the actual Link1 and Link2 selectors and paste them here

and also screenshot your full selector (including the part after “parentid=…” and paste it here

Hello @user123mem

You need to make sure no other dynamic attributes are there in the selector.
If the aaname is a valid attribute then the selector which you have provided is correct. Better to share the full selector here.

This is my flow

  1. i do datascrapping to get the data in the web page , and write it in the excel
  2. Then , system will read the excel range and read the column “Test A”. as for now we have 2 rows of data.
  3. Then , i create the variable A for value in column “Test A”
  4. I do activities Click to click the hyperlink from the webpage. This Click activities will based from the Variable A

Column A
Link 1
Link 2

Excel (from data scrapping)
Test A
Value 1 (value same with link 1)
Value 2 (value same with link 2)

Variable A = Currentrow.item(“TestA”).toString

I really do not know how to clearly explain, but hopefully you guys understand.

Hello @user123mem ,

Did you validated the selector? Also plz confirm all the attributes values in the shared selector is static. except the aaname.

Also can you confirm whether the click activity is inside the application scope.

@user123mem whats the selector of link1? can you capture the whole selector and show it here?

the screenshot above is the selector for Link1

and set default value of strLimitCd to 20220601003 and see if you can validate @user123mem

Hello @user123mem ,

The selector seems valid and it should work properly.What is the error that you are getting?

Also did you recorded this click event or directly used the click activity? Can you please share the property panel screenshot of this activity.


Also, can you confirm no extra spaces are there in the variable which you are passing to aaname?

If yes, can you modify the expression as below.

yup can confirm theres no extra space

i set the variable as strLimit=“ABC” as string
then inside selector i just put the variable inside aaname. but when u try to validate it still give an error saying it is invalid.


@user123mem did you right clicked and selected the variable or manually entered? Can you try to right click and click on variable and select the variable from there.

i try both manual and also select the variable from right click but somehow the error still there.

is there a default value for strLimit in variables pane? if not it will fail to validate

Yes it have a default value

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