Complete the code to switch to the new browser window.
driver.switch_to.[1](window_handle)The switch_to.window() method is used to switch the driver's focus to a different browser window.
Complete the code to get all open window handles.
handles = driver.[1]driver.window_handles returns a list of all open window handles.
Fix the error in switching back to the original window.
driver.switch_to.[1](original_handle)You must call switch_to.window() with the handle as an argument, not assign it.
Fill both blanks to switch to the last opened window.
driver.switch_to.[1](driver.[2][-1])
Use switch_to.window() with the last handle from window_handles list to switch to the newest window.
Fill all three blanks to close the current window and switch back to the first window.
driver.[1]() driver.switch_to.[2](driver.[3][0])
First, close the current window with close(). Then switch back to the first window using switch_to.window() with the first handle from window_handles.