Recently, we found that some students are prone to a WDARequestError when using our iOS popup processing interface:
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'})
Copy the code
This is because the WebDriverAgent deployed by students is not the latest version, so students need to pull down the latest WebDriverAgent from Github of Appium and redeploy it to iOS devices, so that we can use our iOS popup processing interface normally:
Finally, a small problem is added. When dealing with iOS pop-ups, many students find that neither Airtest screenshot operation nor POCO control operation can handle iOS pop-ups. In fact, there is a special popup processing interface for iOS devices:
- How good is the new iOS interface in Airtest 1.1.8? ! I’ll tell you today.