desired_tab = driver.current_window_handle #storing the handle in a variable if driver.current_window_handle != desired_tab: driver.switch_to_window(desired_tab) #switching to the tab in case it's not
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter