51Testing软件测试论坛

标题: appium运行报错求各位大牛看看如何解决 [打印本页]

作者: t402600    时间: 2017-3-27 21:36
标题: appium运行报错求各位大牛看看如何解决
[MJSONWP] Encountered internal error running command: Error: Error occured while starting App. Original error: com.sankuai.meituan/com.sankuai.meituan.activity.Welcome or .activity.Welcome or .com.sankuai.meituan.activity.Welcome never started
    at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
    at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:80:9)
    at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 82733 ms - 319


运行代码如下:
public class EengLu {
       
        public static void main(String[] args) throws Exception {
               
                File app=new File("/Users/dsjh/Downloads/meituan.apk");
                DesiredCapabilities caps=new DesiredCapabilities();
                caps.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
                caps.setCapability(MobileCapabilityType.DEVICE_NAME, "suibianxie");
                caps.setCapability(AndroidMobileCapabilityType.NO_SIGN, true);
                caps.setCapability(AndroidMobileCapabilityType.UNICODE_KEYBOARD, true);
                caps.setCapability(AndroidMobileCapabilityType.RESET_KEYBOARD, true);
               
                AndroidDriver<AndroidElement> driver=new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"),caps);
               
        }       

}




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2