想要在 ios 中的两个原生应用之间切换。1 个应用程序是第 3 方应用程序,另一个与 Apple Health 相关。我正在尝试使用以下代码在应用程序之间切换:
public static void switchToAppleHealth(IOSDriver driver,String bundleId) throws MalformedURLException {
ConfigurationManager.getBundle().setProperty(bundleId, "com.apple.Health");
DesiredCapabilities capabilities = DesiredCapabilities.iphone();
capabilities.setCapability("bundleId", bundleId);
System.out.println(bundleId+"################");
driver = new IOSDriver(new URL("https://nexperience/perfectomobile/wd/hub"), capabilities);
driver.launchApp();
System.out.println(bundleId+"################");
}