Appium 请大家帮忙,c# 使用模拟器正常,连真机连不上

AutoMeter-老范 · 2014年03月21日 · 最后由 Simon 回复于 2014年06月29日 · 1739 次阅读

请大家帮忙,真机 usb 调试已经打开
代码:
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("app-package", "com.example.testandriror");
//caps.SetCapability("browserName", "");
caps.SetCapability("device", "Selendroid");//模拟器 Android
caps.SetCapability("app-activity", "com.example.testandriror.MainActivity");
caps.SetCapability("takesScreenshot", true);
caps.SetCapability("version", "2.3");//模拟器 4.4
caps.SetCapability("device ID", "samsung-gt_i9103-43c720043e061d7");//模拟器没这行
caps.SetCapability("app", @"C:\TestAndriror.apk");

RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4723/wd/hub"), caps);

模拟器可以连上,正常操作,真机连接报错如下:
A new session could not be created. (Original error: Command failed: Exception in thread "main" java.lang.RuntimeException: Unable to rename input apk. C:\TestAndriror.apk
at s.Sign.sign(Sign.java:421)
at s.Sign.main(Sign.java:532)
) (33)

共收到 1 条回复 时间 点赞

求助个,C# 使用 appium 连接 Android(4.3)模拟器,提示:
代码如下:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("browserName", "");
capabilities.SetCapability("appium-version", "1.1");
capabilities.SetCapability("platformName", "Android");
capabilities.SetCapability("platformVersion", "4.3");
capabilities.SetCapability("deviceName", "Android Emulator");
capabilities.SetCapability("app", @"F:\appium\appium-master\assets\ApiDemos.apk");
driver = new AppiumDriver(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities);

进行测试,提示:
{"A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session. The status of the exception was ReceiveFailure, and the message was: 基础连接已经关闭: 接收时发生错误。"}

检查 appium 命令行中发现错误:
Arguments to path.resolve must be string。

运行环境: vs2013 + 最新版 nodejs,appium,虚拟机是使用 Genymotion 加载

AutoMeter-老范 关闭了讨论 03月05日 16:55
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册