Go back to the first firefox tab after a testsuite that run more macros that open new tabs

I run a testsuite that runs many macros that load into a new tab every time, at the end of the testsuite I would like you to return to the 1 tab of firefox absolutely.

Probably I need the javascript, can someone help me find a solution to return to the 1 tab of firefox ?

I can’t use the selectWindow command tab-0 because the testsuite loads each macro into a new tab and ui vision cannot return to the 1 tab of firefox (the first one opened on the left).

Any suggestion was appreciated.

I have a couple of suggestions.

If you know what order the tests are being run in you could always tab= -1 for the first test then tab= -2 for the second test.

You could also have a CSV file that continues “variable” counting up the value which could correlate to the number of tabs and go back kind of how I suggested in the first idea.

You could also open the first webpage (the one you want to keep going back to) in a new window and keep switching back to that window

Lastly, you could have a: selectwindow | tab=-1 in a looping script which exits on an error which occurs when you can’t go back any tabs

I hope one or more of these ideas are helpful!

After some searches i found a better solution

selectWindow | title=XXX

XXX add the title of the tab can use * too

This switch in prefered tabs and go in every tab you want

Info about command