Clicking the correct chrome browser tab

Dear Experts,

Seeking your knowledge with an issue I’m having.

I have made an automation where I open a chrome browser, and through a click in the first tab (tab 1), the browser opens a new tab (tab 2), where the rest of the clicking will be done.

However, when I try, as next step, to click an item in “Tab 2” the browser switches back and tries to click in “tab 1”

I’ve tried using editing the properties of the click in the second tab, by changing the name of the tab (removing the full number and replacing with joker sign *) but when I do that, the UI robot can no longer find the element.

I tried using the keyboard shortcut CTRL+TAB and even CTRL+2 to select the tab, but whatever I do, the restult is the same:
1: If I have the “full path” in the "windows selector (Application Instance) the action will be done in the wrong tab
2: If I use joker characters, the UI robot cannot find the element.

I’m really at a loss here.

Is there any way I can close the “Tab 1” so I only have “tab 2” open or do you have any other suggestions?

To enhance my expanation I’ve added a few screenshots of the details of the tabs and the error I get.

I thank you in advance for any help or tips you can give me.
Image 1: The error message I get when the Robot cannot fin teh element
Image 2: The propertise os the “tab 2” with the full case number, that, albeit the robot finds it, it clicks in tab 1
Image 3: The propertise for tab 1

A lot of the exact behavior will depend on the names of the tabs (i.e. whether the robot thinks they are “close enough” or can tell them apart with the default settings). Here are some general things to try:

  • After your automation opens the second tab, add a second “Use Application/Browser” and indicate the new tab. If needed, you can then tweak the properties to get a specific match to this tab vs. the first one.
  • If you need to, you can close the first tab using the “Navigate Browser” activity and selecting the “Close Tab” action.

Thank you Andrew for your suggestion. I had also wondered about closing the first tab and I will try that as well as your other suggestions.

These days the workload here is high so my time is rather restricted when it comes to programming the robots but I will get back to you once I’ve tested it.

Thank you again for your suggestions.