以下是我的代码和错误sin appium控制台的链接和 Eclipse 控制台:
链接到 eclipse 控制台和 appium 控制台中的代码和错误
如果你检查 Appium 日志,它有这样一行 -
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : version
这意味着版本不是正确的属性名称。您必须将其更改为 platformVersion
.尝试更改它并查看它是否有效。代码行是这样的——
capabilities.setCapability("platformVersion", "7.0");
此外,无需提供浏览器名称,因为您不会在任何地方使用它。但这不应以任何方式影响测试脚本的执行。
您还可以查看这篇文章,其中显示了可用于启动应用程序的功能 - 用于启动应用程序的 Appium 脚本