Is it possible to check if a window (tab) with a given title exists

In a section of my macro I need to check if a window (tab) with a given title exists. Is it possible to do this?

Yes it’s possibile

Use if with selectwindow with title, if command fails the tab title is not present, if command working the tab title is present, need an if with statusok check result.

https://ui.vision/rpa/docs/selenium-ide/selectwindow

If_v2
statusok is true (selectwindow find the title tab)
else
tab title not found

1 Like

Yes, I was aware of that approach but I need to avoid changing the focus to that window.

You see, the window auto-closes (outside my control) and doing it the way you suggest introduces lots of extra steps and tests. That’s because, if it auto-closes while it has the focus, the focus will revert to my main window (the one running the macro).

If there were a simple test without moving the focus to the other window, the chances of auto-close messing things up would be reduced to an acceptable level — I think!

If the browser window closes automatically you will have a lot of problems to automate and it will take you a long time to find a valid solution, it is really deleterious for automations when you close in automatic browser windows

1 Like

Very true :wink:
Thanks for your suggestion, anyway, @newuserkantu :slight_smile:

1 Like