第一次使用appium,执行Java脚本总是报错:java.lang.NoSuchMethodError:org.openqa.selenium.remote.HttpCommandExecutor.……
导致driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);这里空指针。我的运行环境:eclipse
解决方法:鼠标右键xxx.java --> RunAs -->Run Configurations -->选择左边栏中JUnit下对应的xxx类名(如果已默认选中则跳过这一步)--> 点击对话框下方 Select Other --> 勾选 Use configuration specific settions --> 选择 Android JUnit Test Launcher --> 点击ok。 再次 RunAs -> JUnit Test