<iframe scrolling="auto" id="frm47a6f4df-da6f-42fd-92ca-32c1ba89817a" src="../../zlhrcdcs/construction/cdcs/pipelaying/cons_dcs_linecompletionpoint/query_cons_dcs_linecompletionpoint.html?roleId=null&token=e4a9c3f5-6008-4af0-b2e3-6f5744772c2d" width="100%" height="100%" frameborder="no"></iframe>
iframe ID 这种情况下怎么 selenium 切换过来
iframe=driver.find_element_by_xpath('//*[@id="frm47a6f4df-da6f-42fd-92ca-32c1ba89817a"]') driver.switch_to.frame(iframe) time.sleep(5)
这是我写的
下面是报的错误
selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <iframe id="frm47a6f4df-da6f-42fd-92ca-32c1ba89817a" src="../../zlhrcdcs/construction/cdcs/pipelaying/cons_dcs_linecompletionpoint/query_cons_dcs_linecompletionpoint.html?roleId=null&token=e0e7fcdb-f1f9-473b-b44b-bf214d089534"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed