I’m working on a script that’ll operate / cycle between multiple tabs, and perform actions on each one. The problem I’m having is that I can’t seem to get the actions to actually perform on the active tab. I am successfully switching tabs, but even if I am on tab 2 it is still executing the actions on tab 1 (the original tab).
Attached are the 3 .xaml files I’ve made as a sample of what I’m trying to do. To run it, you just need to have your first 3 browser tabs in Chrome be on www.google.com.
It’s because of the title URL or reference used in your use application / browser activity
Make sure that for each u have unique title attribute or htmlwindow attribute
So that if u add any activity inside that Use Application/Browser it will execute in that exact tab
Check once with the selector whether they are unique from each other
Hi, thank you for your reply. Unfortunately in my real use-case, the URL will indeed be identical. I’ve tried adding a Get Attribute for htmlwindow, but nothing comes of it. Would you be able to provide a sample xaml or screenshot of this in action by chance?
I did find a way to make it work by opening an entire new Chrome window & accessing it using input / output elements in the Use Application / Browser activity (which do not seem to work with new tabs, as shown in my xaml files). New tab would be ideal, but if it doesn’t end up working or being possible then at least I have an alternative =)
Hey, I know this is late but I was looking for a solution for the same case: interacting with a new tab in the same browser. I solved it and made an activity to get the active tab for the automation at runtime. The activity gets the active tab and outputs a UiElement. Then you can input that into another useApp/Browser activity and continue your automation in the same browser instance. No need to open a new window. Here is the activity link.
You should be using Use Application/Browser to open the tabs and using the output property to store each tab as an object in separate variables. Then later you use the variables as the input element instead of selectors.