Do we need UDID and BundleId when app file path has given in capabilities list when App file path given? Declared capabilities for the app as below:
//******************
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);
***********************************///
and the app is still launching in the emulator after running the script! In which scenario do we need to specify the UDID and BundleId?. If anybody clarifies this doubt would be appreciated.
bundle id is the essential desired capabilities for Real ios Devices.in case of emulator, APP would work.
udid comes in generic capabilities(ios &android) , however in android you can use deviceName instead of udid.
in ios udid is mandatory in case of Real ios devices, since you are using emulator, its not required.
By definition
udid:
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'.
more information can be seen from here
http://appium.io/docs/en/writing-running-appium/caps/
Hope that clears your doubt