【背景】
Android App 最新版本新增了权限请求,即,首次启动 App 时会弹出权限请求,仅当用户允许权限后才进入 Wizard 页面。
【问题点】
1、Driver.init() 获取 session_id 过程中,App 已经启动了(页面停留在权限请求弹窗,见截图)
2、但是 Macaca Server 认为 App 并没有启动,因此,给出了如下错误:
driver.init()
File "D:\Python\Python36\lib\site-packages\macaca\util.py", line 145, in fluen
t_interface
ret = func(instance, *args, **kwargs)
File "D:\Python\Python36\lib\site-packages\macaca\webdriver.py", line 148, in
init
}, False)
File "D:\Python\Python36\lib\site-packages\macaca\webdriver.py", line 66, in _
execute
res = self.remote_invoker.execute(command, data)
File "D:\Python\Python36\lib\site-packages\macaca\remote_invoker.py", line 110
, in execute
return self._request(method, url, body)
File "D:\Python\Python36\lib\site-packages\macaca\remote_invoker.py", line 145
, in _request
res.raise_for_status()
File "D:\Python\Python36\lib\site-packages\requests\models.py", line 909, in r
aise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url:
http://127.0.0.1:3456/wd/hub/session
3、因此,想请教大家,Macaca Server 是如何判定 Android App 已经启动?
@xdf达峰老师能否给个解答呢?多谢!