raise exception_class(message, screen, stacktrace) selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <span> 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
3条回答 默认 最新
CSDN专家-黄老师 2021-06-08 21:40关注selenium的定位方式不会直接出异常,类似find_element_by_id这方法,如果不存在元素,则返回None,你可以对其判断再执行对应操作。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报