使用selenium時,遇到element is not attached to the page document的解決方法


在爬取一些網站時,有時會提交網頁,網頁更新后但是頁面元素沒有連接成功

只需要使用webdriver.Chrome().refresh刷新一下網頁就可以,還要在前面等待幾秒鍾再刷新,time.sleep(5)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 stale element reference: element is not attached to the page document 異常 關於報錯stale element reference: element is not attached to the page document處理 使用Github時遇到問題的解決方法 selenium報錯Element is not clickable at point及四種解決方法 python selenium element click intercepted 解決方法 flutter使用svg庫時提示The