环境:
windows 7

AppiumForWindows-0.18.0
selenium-java-2.41.0 junit3
sdk api level 19
安卓虚拟机 nexus5

确认环境配置已 ok。

执行步骤:
运行测试代码,采用 junit test 报错:
org.openqa.selenium.SessionNotCreatedException: 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?) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15.50 seconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'xx', ip: 'xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: com.incito.appiumdemo.ContactManagerTest$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)


↙↙↙阅读原文可查看相关链接,并与作者交流