新手区 appium 运行报错,求大神帮忙

susan198967 · 2014年04月08日 · 最后由 susan198967 回复于 2014年04月14日 · 2203 次阅读

在 windows 7 系统上,正确安装 appium 和启动模拟器后运行程序,出现以下错误:
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Error locating the app: ENOENT, stat 'D:\workspace\vip001\apps\temaihui\temaihui.apk') (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 128 milliseconds
Build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01'
System info: host: 'wangshuzhen-PC', ip: '192.168.39.180', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
Driver info: com.vip.appium.vip001.AppTest$SwipeableWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:218)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:113)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at com.vip.appium.vip001.AppTest$SwipeableWebDriver.(AppTest.java:160)
at com.vip.appium.vip001.AppTest.setUp(AppTest.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
求问这个到底是什么原因引起的?谢谢!

共收到 6 条回复 时间 点赞

出现以下错误:
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Error locating the app: ENOENT, stat 'D:\workspace\vip001\apps\temaihui\temaihui.apk')

以下是神马错误?

#1 楼 @lihuazhang 就是贴上来的这个错误呀,只有这一个错误,对不起我说错了。

#2 楼 @susan198967 这个错误看不懂嘛? 他不是说你的应用不存在啊,找不到啊

4楼 已删除

#3 楼 @lihuazhang 谢谢,果然,我在项目的 workspace 去看,包含应用的那个文件夹果然是空了,我重新复制到文件夹,再启动 Eclipse 后还是会报错,再去看那个文件夹又为空了,这个又是什么原因呢?应用都是我正常添加进去的啊?

#5 楼 @susan198967 你试试看放在别的路径

#6 楼 @lihuazhang 我直接在命令将程序安装了,然后程序中启动进入的不是安装界面,就可以了,还是不知道这个问题要如何解决。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册