How to loop through all opening IE tabs/windows

Hello robot masters,

In an assisted process I need to go through all opening IE tabs/windows and do some operation in each tab/window. Is there any method that I can get something like a ‘window collection’, so that I can simply use ‘for each’ loop?

Thank you in advance.

1 Like

Hi @Masatoi,

Not sure if there’s a simple activity way of doing it (likely using know windows and Attach Window activity), but you could potentially use Send Hotkey with Ctrl + tab to navigate to the next tab once done (using a loop depending on how many tabs). Could also use Alt + tab for switching between windows, ut would be a bit tougher to set up.

Thanks @mcicca! However still I can’t find a way to get ‘how many tabs’ or ‘how many IE windows’ opened; could you please also give some suggestions?

1 Like

I had assumed this was a known number of tabs/windows that had been opened, but is that not the case? If the opening of the windows was done as part of the same process (or a different process) you could keep a count of how many are opened, and then use that as your loop counter for how many times you need to send the hotkey.

If you are working with already opened windows, that is a separate issue and I’m not too sure on how to track that cleanly (you could use image reading to literally look at how many windows/tabs are open but not sure how reliable that would be).

2 Likes

@Masatoi
Just try to use Get Active Window activity not sure whether it will works for you or not.

2 Likes

Hi @Masatoi

Hope this could help you

Cheers

2 Likes

Just add to this discussion we use Invoke code VB.net code to play with IE Windows and other option we have we can use CTRL keys to move across different tabs in the browser. Ex: If we want to move to 5th tab in the browser we can use Ctrl+5 and if we want to go to 2nd tab we can use CTRL+2 likewise, Lets try these.

3 Likes