Python Selenium 4,打开新窗口或新标签,并切换到新窗口或新标签


browser.switch_to.new_window('tab')
time.sleep(3)
browser.switch_to.new_window('window')