Appium:iOS获取UnreachableBrowserException

时间:2016-09-28 13:01:26

标签: ios appium-ios

平台兼容性:

Mac OS X 10.10 or higher, 10.11.1 recommended **[Using 10.10.5]**

XCode >= 6.0, 7.1.1 recommended **[Using 7]**

Apple Developer Tools (iPhone simulator SDK, command line tools) 

Appium Server **[Using v1.5.3]**

Node.js **[Using V4.5.0]** 

实际上并不知道在MAC系统中配置Appium的所有SDK /要求的完美组合。

在Appium logcat中出错: 无法加载节点配置文件以向网格注册。

我的代码是

@BeforeTest
public void preSetup() throws MalformedURLException{

    DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

    File f=new File("/Users/nandini/Documents/AppiumWorkSpace/One20Automation/app/One20.app");

    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
    desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6");
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.0");

    desiredCapabilities.setCapability("udid", "E1791000-5BC8-4741-A1AC-416FDEEB3048");
    desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM, "MAC");
    desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari");
    desiredCapabilities.setCapability(MobileCapabilityType.APP, f.getAbsolutePath());

    driver=new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities);
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

}

注意:实际上应用程序已经安装但没有在应用程序中运行并进一步工作。此外,代码模拟器出现在屏幕上,但有时会自动关闭它。

请建议。

0 个答案:

没有答案