其他分享
首页 > 其他分享> > selenium之StaleElementReferenceException

selenium之StaleElementReferenceException

作者:互联网

StaleElementReferenceException: Message: The element reference of

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

元素引用已经失效;要么元素不再附加到DOM中,要么不在当前框架上下文中,要么文档已经刷新

原因:机子太慢或者网速的问题,甚至可能是机子内存不够。

解决思路:让他睡上几秒

from time import sleep
sleep(5)

标签:StaleElementReferenceException,DOM,要么,selenium,element,sleep,机子
来源: https://blog.csdn.net/luoxuexi2020/article/details/116903891