How to get app information like app version, device os version in ios using Appium?

筅森魡賤 提交于 2019-12-24 01:01:51

问题


I am testing the app using appium and integrating the test output in testrail. I need to add the device and app information in the testrail. In android i am able to get app and device information like device model, device version and app version using adb command like following:

adb -s 012313gasda shell getprop ro.product.model
adb -s 012313gasda shell getprop ro.build.version.release
adb -s 012313gasda shell dumpsys package com.test.app |grep versionName

How can i achieve the same information for ios? using following command will return you the device name and OS version as set in desired capabilities

driver.getCapabilities().getCapability("deviceName").toString();
driver.getCapabilities().getCapability("CapabilityType.VERSION").toString();

Is there anyway to get device and app information for ios?


回答1:


You can do something similar to adb using ideviceinfo such as in this SO post https://stackoverflow.com/a/55028994/8016330

PRODUCT_NAME=$(ideviceinfo --udid $DEVICE_UDID --key ProductName)
PRODUCT_TYPE=$(ideviceinfo --udid $DEVICE_UDID --key ProductType)
PRODUCT_VERSION=$(ideviceinfo --udid $DEVICE_UDID --key ProductVersion)

HTH

James



来源:https://stackoverflow.com/questions/56372031/how-to-get-app-information-like-app-version-device-os-version-in-ios-using-appi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!