How to define a dynamic selector for an href element

Hello Folks,

I am stuck at the below scenario and need help.

I am trying to fetch details of an Assignment raised for an employee thru a web page. Employee can have multiple Assignments and each Assignment has a unique ID.

Assignment ID is obtained by using another process and I have called it in my current process to access the Assignment ID to a variable.

In the current process I am working on, I should click the exact fetched Assignment ID in the web page. It can be anywhere in the web page as there can be a possibility of multiple assignments.

Now the problem is I cannot specify the selector. All Assignment ID’s have the same class name it is an href element. I cannot specify any selection index as well since it can come in any order. Only difference in the assignment ID that appears after the href link. (You can see in the screenshot)

So how can i specify a selector that help me exactly click the assignmentID as per the value contained in my variable.

Please find screenshots attached as well.

Thanks in advance.

dynamizing a selector is done as decribed here:

have a check within uiexplorer on an a element and try to incorporate the id info within the innertext attribute like innertext="*{{YourIDVar}}*" for an selector used in clicked or element exists activity

1 Like

Hi @suryasunderraj

Can you try with get attribute activity?

@Atul_Rai Sorry, I did not understand. Isn’t Get Attribute used to fetch. It doesn’t perform a search right?

@suryasunderraj can you share the result of UI Explorer after selecting any Assignment ID

Thanks :+1:. I can use the variable creation method you suggested for dynamic selectors and pass it during runtime. :slight_smile:

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