【python】UI自动化多窗口处理

#进入到第二个窗口
windows = self.driver.window_handles
self.driver.switch_to.window(windows[1])
#关闭当前窗口,回到第一个
self.driver.close()
self.driver.switch_to.window(windows[0])
原文地址:https://www.cnblogs.com/luoguoxing/p/14864439.html