📅  最后修改于: 2022-03-11 14:58:10.604000             🧑  作者: Mango
driver.switchTo().window(handleOfTabWeWantToSwitch);
We need to create a loop to switch to windows that is opening later on.
To switch back to the main window (default window):
driver.switchTo().window(mainHandle);