最近我们发现经常有一些同学在使用我们iOS弹窗处理接口时,容易出现一个 WDARequestError
的报错:
Traceback (most recent call last): File "airtest/cli/runner.py", line 70, in runTest File "/Users/han/Documents/11.air/11.py", line 14, in <module> ios.alert_accept() File "/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/ios/ios.py", line 34, in wrapper return func(self, *args, **kwargs) File "/Applications/AirtestIDE.app/Contents/MacOS/airtest/core/ios/ios.py", line 583, in alert_accept return self.driver.alert.accept() File "site-packages/wda/__init__.py", line 1144, in accept File "site-packages/wda/utils.py", line 47, in _inner File "site-packages/wda/__init__.py", line 454, in _fetch File "site-packages/wda/__init__.py", line 124, in httpdo File "site-packages/wda/__init__.py", line 180, in _unsafe_httpdo wda.exceptions.WDAUnknownError: WDARequestError(status=110, value={'error': 'unknown error', 'message': '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'}) 复制代码
这是因为同学们部署的WebDriverAgent不是最新版本导致的,需要同学们 从appium的github上拉取下最新的WebDriverAgent重新部署到iOS设备上 ,即可正常使用我们的iOS弹窗处理接口:
网络异常,图片无法展示
|
最后补充一个小问题,很多同学在处理iOS的弹窗时发现,无论是使用Airtest的截图操作,还是poco的控件操作,都无法处理iOS弹窗,其实对于iOS设备,是有专门的弹窗处理接口的。