nowhandle = self.driver.current_window_handle # 获取当前窗
# 新开标签页
allhandle = self.driver.window_handles # 获取所有窗口 for newhandle in allhandle: if newhandle != nowhandle: self.driver.switch_to_window(newhandle)
nowhandle = self.driver.current_window_handle # 获取当前窗 # 新开标签页 allhandle = self.driver.window_handles # 获取所有窗口 for newhandle in allhandle: if newhandle != nowhandle: self.driver.switch_to_window(newhandle)