楼主最后有解决连接不上问题没
遇到你同样的问题,确实加入中文字体的镜像,ping 不通,这是什么问题
我正在试 adb 相关命令,appium 就没有相关接口吗
先试试能不能有其他的办法,实在不行只能 tap,不同手机,点击位置不同,所以逼不得已不想用这个方法
看一下你 sdk 有没有 zipalign.exe 这个工具,他安装前,需要优化压缩 apk,这个过程是必须的。我是 sdk 没有这个工具导致的
这样盲目删掉更新是不行的,appium-uiautomator2-driver 有很多依赖,对依赖的版本也有要求,我试过了,起不来,就不知道大神们都是怎么做的,后面我自己的问题找到了,跑起来,后面就没有阻碍了,可以成功找到 toast,没遇到你遇到的问题,谢谢你哈
自己找到原因了,谢谢大家
UiAutomator2 Drvier: 0.2.6 你这个是单独更新的嘛?安装 appium 自带的,怎么更新?
也就是楼主你也没遇到过?我几个版本试过了,都是没办法装那两个 apk
appium 换成 1.6.3,selenium3.0.1,java-client 5.0.0-BETA3,换成跟你一样的版本,不过 UiAutomator2 Drvier 显示是 0.2.3,出现的结果 testng 报上面错误,appium 服务还是报相同错误,然后手机没办法装那两个 apk
两种写法是一样的,都试过不行,我手动装了了两个应用,看服务有多这些提示
[UiAutomator2] running command...
adb -s WTKDU16707010313 shell am instrument -w io.appium.uiautomator2.server.te
st/android.support.test.runner.AndroidJUnitRunner...
[UiAutomator2] Waiting for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/h
ub/status] with no body
最后还是报 Bad parameters: BadParametersError: Parameters were incorrect.
We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities
","capabilities","sessionId","id"]} and you sent ["capabilities"] 这个结束了
按路径有找到,但是手机没有安装,没任何提示?
protected AndroidDriver driver;最上面这句是这样的不知贴上去怎么变了,注释 capabilities.setCapability("automationName","uiautomator2");这句,就可以跑起来
protected AndroidDriver driver;
@Parameters({ "serverIP","port", "platformName","udid",
"appPackage", "appActivity" })
@BeforeTest
public void setUp(String serverIP,String port,String platformName,String udid,
String appPackage,String appActivity) throws Exception {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("platformName", platformName);
capabilities.setCapability("deviceName", udid);
capabilities.setCapability("udid", udid);
capabilities.setCapability("platformVersion", "6.0");
capabilities.setCapability("unicodeKeyboard", true);
capabilities.setCapability("resetKeyboard", true);
capabilities.setCapability("noReset", true);
capabilities.setCapability("noSign", true);
capabilities.setCapability("appPackage", appPackage);
capabilities.setCapability("appActivity", appActivity);
capabilities.setCapability("automationName","uiautomator2");
driver = new AndroidDriver(new URL("http://" + serverIP + ":" + port + "/wd/hub"),capabilities);
}
请问下,我用的是 appium1.6.4,jdk1.8,selenium3.3.1.添加 capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);这句后,就没办法初始化 driver,报错信息如下
Bad parameters: BadParametersError: Parameters were incorrect.
We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities
","capabilities","sessionId","id"]} and you sent ["capabilities"],请问大家有遇到过吗?这是哪里有问题?