【问题标题】:Trouble Connecting Appium to Selenium Grid将 Appium 连接到 Selenium 网格时出现问题
【发布时间】:2014-08-06 15:30:56
【问题描述】:

我在将 Appium 连接到 Selenium Grid 时遇到了一些困难。

这是我的 nodeconfig 文件的内容:

{
  "capabilities":
      [
        {
          "browserName":“iPhone5”,
          "version”:”6.1,
          "maxInstances": 1,
          "platform”:”MAC”
        }
      ],
  "configuration":
  {
    "cleanUpCycle":2000,
    "timeout":30000,
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "url":`"http://127.0.0.1:4725/wd/hub",`
    "host": 127.0.0.1,
    "port": 4723,
    "maxSession": 1,
    "register": true,
    "hub": `“http://192.168.28.74:4444/grid/register”`
  }
}

使用 Appium 应用程序,我单击启动。它不会引发任何错误,但我在 Grid 控制台页面上看不到它。

如果有人有将 Mac 上的 Appium 连接到 Grid 的经验,您能指导我完成吗?

【问题讨论】:

    标签: selenium selenium-grid appium


    【解决方案1】:

    我在带有 Selenium Grid 的 Mac OS X 上运行 Appium for iOS。我已经尝试使用运行Selenium Server 作为集线器以及通过Selenium Plugin 在Jenkins 中运行它。同样作为一个节点,我运行它 node.js 版本和 Appium.app 版本并且没有任何问题。

    如果您能提供更多详细信息,您将如何尝试运行它会很好。

    另外,我发现您的 nodeconfig 文件看起来有些奇怪:

    "browserName":“iPhone5”, <- here you have different types of double quotes " and “
    "version”:”6.1 <- here the same and also one is missing.
    

    看来您只是没有有效的 JSON 文件。

    这是我的配置文件的示例,它适用于我:

    {
      "capabilities":
          [
            {
              "browserName": "iPhone5",
              "version":"7.1",
              "maxInstances": 1,
              "platform":"MAC"
            }
          ],
      "configuration":
      {
        "cleanUpCycle":2000,
        "timeout":30000,
        "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
        "url":"http://127.0.0.1:4723/wd/hub",
        "host": "127.0.0.1",
        "port": 4723,
        "maxSession": 1,
        "register": true,
        "registerCycle": 5000,
        "hubPort": 4444,
        "hubHost": "192.168.33.101"
      }
    }
    

    希望这会有所帮助。

    【讨论】:

    • 这确实有帮助,谢谢。括号有问题。 Appium 对它们非常挑剔。
    • 我可以连接到电网,但我无法运行测试。你用什么来配置你的驱动程序?这是我的:'案例“iPhone”:DesiredCapabilities iOS = DesiredCapabilities.iphone(); iOS.setPlatform(Platform.ANY); driver = new RemoteWebDriver (new URL("127.0.0.1:4723/wd/hub"), iOS); break;'
    猜你喜欢
    • 1970-01-01
    • 2016-06-08
    • 1970-01-01
    • 2016-11-15
    • 1970-01-01
    • 2014-05-16
    • 2021-03-13
    • 2020-05-12
    • 2014-09-12
    相关资源
    最近更新 更多