Closed Roise0568 closed 4 years ago
创建session时,有时会出错 KeyError: 'capabilites',可否提供wda的错误类型,便于捕捉识别错误并处理,谢谢!
class Session(object): def init(self, httpclient, session_id): self.http = httpclient self._target = None self._timeout = 30.0 # default elment search timeout, change through implicitly_wait(.) v = self.http.get('/').value try: self.capabilities = v['capabilities'] except KeyError: raise AnyWdaErrorType("error message description")
self._sid = v['sessionId'] self.__scale = None
什么时候会出现?
Sent with GitHawk
创建session时,有时会出错 KeyError: 'capabilites',可否提供wda的错误类型,便于捕捉识别错误并处理,谢谢!
class Session(object): def init(self, httpclient, session_id): self.http = httpclient self._target = None self._timeout = 30.0 # default elment search timeout, change through implicitly_wait(.) v = self.http.get('/').value try: self.capabilities = v['capabilities'] except KeyError: raise AnyWdaErrorType("error message description")