Firefox:80
geckodriver:0.24
selenium切换窗口时报错:
driver.switch_to.window(driver.window_handles[-1])
selenium.common.exceptions.InvalidArgumentException: Message: Expected “handle” to be a string, got [object Undefined] undefined
查找后发现是geckodriver版本不匹配,下载了最新的0.27版本则解决该问题.
geckodriver下载地址:https://github.com/mozilla/geckodriver/releases/tag/v0.27.0