📜  我们如何使用它的句柄切换到另一个窗口? - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:10.604000             🧑  作者: Mango

代码示例1
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);