当应用程序文件路径在功能列表中给出时,我们是否需要 UDID 和 BundleId?

Do we need UDID and BundleId when app file path has given in capabilities list?

当应用程序文件路径给定时,当应用程序文件路径在功能列表中给定时,我们是否需要UDID和BundleId?声明的应用程序功能如下:

//******************
File app_path = new File("/Users/Ram/Desktop/xyz.app.zip");

DesiredCapabilities caps = new DesiredCapabilities();

caps.setCapability("MobileCapabilitiyType.PLATFORM_VERSION", "8.1");
caps.setCapability("MobileCapabilitiyType.DEVICE_NAME", "iPhone 6");
caps.setCapability("MobileCapabilitiyType.BROWSER_NAME", "");
caps.setCapability("MobileCapabilitiyType.APP", app_path.getAbsoltePath());

IOSDriver driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub", caps), caps);

***********************************///

并且应用程序在 运行 脚本之后仍在模拟器中启动!什么场景需要指定UDID和BundleId?如果有人澄清这个疑问,我们将不胜感激。

bundle idReal ios Devices 所需的基本功能。如果是模拟器,APP 可以。

udid 具有通用功能(ios &android) ,但是在 android 中,您可以使用 deviceName 而不是 udid.

in ios udid 在 Real ios 设备的情况下是强制性的,因为您使用的是模拟器,所以它不是必需的。

根据定义

乌迪德:

Unique device identifier of the connected physical device

bundleId:

Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup. To run a test on a real device using the bundle ID, you may omit the 'app' capability, but you must provide 'udid'.

更多信息可以从这里看到

http://appium.io/docs/en/writing-running-appium/caps/

希望能消除您的疑虑