Inspect iOS apps in Appium

To learn the element properties in the app, you will have to use inspector tool (Search icon in below image) provided with Appium app. You can dwonload appium desktop app at https://github.com/appium/appium-desktop/releases

On the next screen, You need to specify the capabilities like bundleId, platformName, platformVersion, deviceName and then start the session. If you have the .app file, you can provide the path of .app file in app capability. Otherwise if app is already installed in the simulator and you know the bundle id, you can use bundleId capability to launch the app. Here is the list of bundle Ids of some of the apps.

  1. Settings app - com.apple.Preferences
  2. Phone app - com.apple.mobilephone
  3. Weather app - com.apple.weather
  4. Calculator app - com.apple.calculator
If you do not know the bundle id of the app, you can ask developer for the same. Or you can use Console.app to find the bundle id. Assuming you have connected iPhone to Mac, as soon as you launch the app on iPhone, the log messages related to the app are shown in the Console.app. You need to search the bundle id in those log messages.

Then simulator is started and specified app is also launched. Now you can inspect the elements in the app. You can also record the session. Once you know the properties of elements, you can use this information to locate the elements when writing tests.
Youtube | Facebook | Twitter | Website Home | Online Grocery Shopping Brisbane