Clicking variable in for each loop

I have a for each loop that goes into an excel file and grabs EmployeeName and then searches on my browser and pulls up a new browser with a row of info on that variable. Then on that new browser It is supposed to click the EmployeeName on the row each time to open a new browser and then close those two and refresh the original browser and repeat the process as it goes down the excel sheet. It works except for it will only click the first persons name on that second browser. Probably because it only recognizes that exact name, not sure. Help would be much appreciated!!

Iam sorry but its so difficult to understand the problem you are facing. Is there any other way of putting it or any screenshots if possible?

Hi @sam1313

Welcome to the community :smiley:

Please elaborate on the issue to address in our community like @sawaseem said maybe just a screenshots r xaml file if you have…Thanks :smiley:

cheers :smiley:

Happy learning :smiley:

1 Like

The element exists because when I do click image it clicks the link, however when I do click text it does not identify the input. The variable “EmployeeName” is being pulled form the excel sheet. Here are two screenshots of this part of the process. Let me know if you need clarification or more info. The black drawings on image 2 are just covering the name.

Thank you
@pattyricarte @sawaseem

Here is part 2 (where the error is stemming from)

Ok, as I understand from the second screenshot,

  1. you are able to find the EmployeeName, but when you are trying to click it, it does not work?

  2. Per your original question, u mean to say that when you are processing the second employee, in the second browser all employee names show up and the problem you are facing is that instead of clicking the second employee name, it is still clicking the first employee name? Correct me if Iam wrong. If this is the problem you are facing then you need to use dynamic selectors and assign your variable name EmployeeName to some unique element in the selector.

Please provide your feedback and lets see if we are on same page.

1 Like

Fixed the selector so it recognized all of the similar elements, thank you for your time and help.

1 Like