【问题标题】:Automating tests using the new ios-driver使用新的 ios-driver 自动化测试
【发布时间】:2013-05-01 10:00:13
【问题描述】:

我正在尝试在 iphone 模拟器或设备上对 Safari 中运行的 Web 应用程序进行自动化测试。 IPhoneDriver 的文档说它现在已被弃用并使用 ios-driver 或 appium。缺少这两个工具的文档,因此其他人有使用 ios-driver 测试在 Safari 中运行的站点的经验。 到目前为止,我尝试的是更新 MobileSafari Info.plist 以允许 ios-driver 对其进行编辑:

sudo chmod 666 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk/Applications/MobileSafari.app/Info.plist

然后我在 Mac 的 3001 端口上启动 selenium-standalone 2.32。然后我运行 ios-driver 站点上提供的示例代码:

public static void main(String[] args) throws Exception {
    DesiredCapabilities safari = IOSCapabilities.iphone("Safari");
    RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:3001/wd/hub"), safari);

    driver.get("http://www.ebay.co.uk/");

    System.out.println(driver.getTitle());
    driver.quit();
}

我收到无法连接错误。我是否也应该在模拟器/设备上安装 webdriver,我认为这就是 iPhoneDriver 的工作原理?

我将 OSX Mountain Lion 与所有最新软件一起使用。

谢谢

【问题讨论】:

    标签: ios-simulator selenium-webdriver ui-automation remotewebdriver


    【解决方案1】:

    你需要启动ios-driver, 在此处启动 ios-driver 部分 http://ios-driver.github.io/ios-driver/?page=setup

    如果您想连接到网格,您需要启动 ios-driver 并将其指向您的网格 http://ios-driver.github.io/ios-driver/?page=scaling

    【讨论】:

      猜你喜欢
      • 2021-02-05
      • 1970-01-01
      • 2018-09-07
      • 1970-01-01
      • 1970-01-01
      • 2014-05-11
      • 2020-05-21
      • 1970-01-01
      • 2014-12-15
      相关资源
      最近更新 更多