运行脚本之后 一直提示这个状态 :test_add_contacts (main.ContactsAndroidTests) ...
手动停止 appium 后,错误提示 log 如下:
eclipse 中报错如下:
WebDriverException: Message: u'A new session could not be created. (Original error: Could not find zipalign; do you have the Android SDK installed and the tools + platform-tools folders added to your PATH?)'
ps:sdk 已经安装,更新到最新了.
Traceback (most recent call last):
File "D:\workspace\Traffic\src\AppiumAndroidTest\android_contacts.py", line 23, in setUp
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
File "C:\Python27\lib\site-packages\appium\webdriver\webdriver.py", line 34, in init
super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 73, in init
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 121, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 171, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 347, in execute
return self._request(command_info[0], url, body=data)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 415, in _request
resp = opener.open(request)
File "C:\Python27\lib\urllib2.py", line 391, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 409, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 369, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1173, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python27\lib\urllib2.py", line 1148, in do_open
raise URLError(err)
URLError:
你的代码那, 用的是 selendroid 还是普通的 android
你需要把 sdk\tools 加到你的 path 变量里面
#4 楼 @seveniruby 我已经加了啊 之前 0.18 的时候是可以运行的
#3 楼 @seveniruby 我用的官网的 contact 例子 用的是普通的安卓
#9 楼 @seveniruby 可以运行了 多谢思寒.. 怎么控制输入的时候是英文字母 ,现在运行的时候输入是中英文混合的