在进行邮件爬取的时候出现了一下错误
Message: stale element reference: element is not attached to the page document
原因是:所引用的元素已过时,不再依附于当前页面。通常情况下,这是因为页面进行了刷新或跳转,
解决方法是,重新使用 findElement 或 findElements 方法进行元素定位
根本原因是在爬取的时候,获取太频繁了,需要在每次获取完成翻页后强制sleep几秒。
![图片[1] - Message: stale element reference: element is not attached to the page document - 正则时光](https://www.regular.cc/wp-content/uploads/2023/12/2022092506532647.png)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END