Selenium Firefox Python错误can't access dead object

在查找元素前加一句browser.switch_to_default_content()

QQ邮箱为例,点击写信的时候,定位元素composebtn 提示 can't access dead object

#写信
		driver.switch_to_default_content()
		driver.find_element_by_id("composebtn").click()

  

posted @ 2017-07-19 10:32  LaMw  阅读(222)  评论(0)    收藏  举报