openatx / facebook-wda

Facebook WebDriverAgent Python Client Library (not official)
MIT License
1.72k stars 266 forks source link

wda 有一些报错,不便于上层识别是哪种类型的错误 #80

Closed Roise0568 closed 4 years ago

Roise0568 commented 5 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
codeskyblue commented 5 years ago

什么时候会出现?

Sent with GitHawk