我的目标是用Appium在一个用世博会构建的应用程序上运行端到端的测试(海龟-cli)。
我尝试使用以下参数启动Appium-Desktop的测试会话:
{
"platformName": "android",
"deviceName": "ENU7N15B0300...",
"app": "path-to-apk",
"automationName": "UiAutomator2"
}该应用程序在智能手机上启动,但我从Appium获得了一个超时错误:
[MJSONWP] Encountered internal error running command: Error: Cannot start the 'com.example.testetoeapplauda' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'adb -P 5037 -s ENU7N15B03007818 shell am start -W -n com.example.testetoeapplauda/host.exp.exponent.MainActivity -S' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'adbExecTimeout' capability有趣的部分是亚行shell命令。当我手动运行这个命令时,应用程序会启动,但是命令没有完成--它只是永远挂起。
$ adb -P 5037 -s ENU7N15B03007818 shell am start -W -n com.example.testetoeapplauda/host.exp.exponent.MainActivity -S
Stopping: com.example.testetoeapplauda
Starting: Intent { cmp=com.example.testetoeapplauda/host.exp.exponent.MainActivity }当我移除参数-W时,它不是阻塞。
您有关于如何在世博应用或上启动Appium测试的建议吗?您知道如何更改Appium以避免使用-W标志吗?
这是apk,如果您想测试它:应用程序-测试apk文件
发布于 2019-08-05 11:42:29
从appium 1.14.0中可以选择跳过等待:
appWaitForLaunch: false这将允许在-W命令中避免使用adb选项。现在,您必须安装appium beta版本,因为它还没有发布。
npm install -g appium@beta
https://stackoverflow.com/questions/57183060
复制相似问题