driver = webdriver.PhantomJS()
driver.get('http://www.google.com.br')
handle = driver.execute_script(
    'return window.open("http://www.pudim.com.br/", "any", "height = 450, width = 800, menubar=yes,scrollbars=yes,toolbar=yes,location=no,resizable=yes");'
    )
driver.switch_to.window(driver.window_handles[1])
print(driver.current_url)
Switch window on Selenium