Appium 【已由 po 主自己解决】Appium 运行 android_contacts.py 时出错,求助!

Jack · 2014年05月12日 · 最后由 思寒_seveniruby 回复于 2014年05月13日 · 1405 次阅读

test_add_contacts (main.ContactsAndroidTests) ... ERROR

======================================================================

ERROR: test_add_contacts (main.ContactsAndroidTests)

Traceback (most recent call last):
File "./sample-code/examples/python/android_contacts.py", line 23, in setUp
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
File "build/bdist.linux-x86_64/egg/appium/webdriver/webdriver.py", line 34, in init
super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 72, in init
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 115, in start_session
'desiredCapabilities': desired_capabilities,
File "/usr/local/lib/python2.7/dist-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 166, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: u"A new session could not be created. (Original error: Could not find AppiumBootstrap.jar; please run 'grunt buildAndroidBootstrap')"


Ran 1 test in 13.123s

FAILED (errors=1)

共收到 9 条回复 时间 点赞
Jack #1 · 2014年05月12日 Author

重新编译出了 AppiumBootstrap.jar,再运行,还是报一样的错误!需要把这个 jar 包 push 到手机的某个位置吗?

Jack #2 · 2014年05月13日 Author

找到原因了,是因为用 npm 安装 appium 不完整的问题。我把 home 下的.nmp 文件夹全部删掉,然后重新下载安装。这回可以运行例子了。

这标题很大气. 哈哈

建议你按照提交 bug 或者 issue 的方式提问, 这样别人会更快的了解你的问题和上下文.
不然很多人看了会一头雾水的. 就不知道如何作答了

#3 楼 @seveniruby 标题是我加的~

#4 楼 @seveniruby 思寒大哥,我觉得需要出个大致规则,规范下发帖的 title 和 content 了~现在确实有点乱套了~

#6 楼 @mingway_hu 出了规范估计也没人看, 在发帖的时候 加个模板吧. 自动加下面的章节如何.

描述

环境

Log

code

标题就看成是 summary
如果是非提问, 就让他们自己删除好了.

@ 恒温

#7 楼 @seveniruby 你做成了一个 bug 系统啊。。。 好主意啊。

#8 楼 @lihuazhang 不是 bug, 是 issue. 感觉还是通用的. 提问,分享貌似都适合.

需要 登录 後方可回應,如果你還沒有帳號按這裡 注册