2016年6月18日 星期六

Selenium webdriver using switch_to_windows() to latest popup window

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

沒有留言:

wibiya widget