driver.switch_to_window(driver.window_handles[-1])
title=driver.title
You can do it simply use the code above. driver.window_handles[-1] would get the lastest window.
reference : http://stackoverflow.com/questions/13113954/selenium-webdriver-using-switch-to-windows-and-printing-the-title-doesnt-prin
沒有留言:
張貼留言