(self, err: WDAError)
当遇到 invalid session id错误时，更新session id并重试
当遇到 invalid session id错误时，更新session id并重试
当遇到 invalid session id错误时，更新session id并重试
def _callback_fix_invalid_session_id(self, err: WDAError):
        """ 当遇到 invalid session id错误时，更新session id并重试 """
        if isinstance(err, WDAInvalidSessionIdError):  # and not self.__is_app:
            self.session_id = None
            return Callback.RET_RETRY
        if isinstance(err, WDAPossiblyCrashedError):
            self.session_id = self.session().session_id  # generate new sessionId
            return Callback.RET_RETRY
        """ 等待设备恢复上线 """
def _callback_fix_invalid_session_id ( self , err : WDAError ) : if isinstance ( err , WDAInvalidSessionIdError ) : # and not self.__is_app: self . session_id = None return Callback . RET_RETRY if isinstance ( err , WDAPossiblyCrashedError ) : self . session_id = self . session ( ) . session_id # generate new sessionId return Callback . RET_RETRY """ 等待设备恢复上线 """