Appium做自动化测试时,启用APP运行不起来,报如下错误:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing
the command. Original error: The instrumentation process cannot be initialized within 30000ms timeout.
Make sure the application under test does not crash and investigate the logcat output. You could also try to increase
the value of 'uiautomator2ServerLaunchTimeout' capability.
遇到这个情况,可以在appium查看上下文日志:
所以在Desired Capabilities 加一个配置
'automationName':'UiAutomator1'
加完这个配置就可以启用了。