iosOptions.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Zeuz_Python_Node 作者: AutomationSolutionz 项目源码 文件源码
def get_product_name(UDID=''):
    ''' Reads the phone name '''

    sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
    CommonUtil.ExecLog(sModuleInfo, "Started", 0)

    try:
        output = get_device_info(UDID)  # Get device info in list format
        tmp = ''
        product_name = ''
        for line in output:
            if 'productname' in line.lower():
                tmp = line
        if (tmp != ''):
            tmp = tmp.split(":")
            product_name = tmp[1].strip()

        if product_name == '':
            CommonUtil.ExecLog(sModuleInfo, "Could not read the iOS product name the device", 3)
            return 'failed'

        CommonUtil.ExecLog(sModuleInfo, "%s" % product_name, 0)
        return product_name
    except Exception:
        return CommonUtil.Exception_Handler(sys.exc_info())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号