BuiltInFunctions_XML.py 文件源码

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

项目:Zeuz_Python_Node 作者: AutomationSolutionz 项目源码 文件源码
def get_target_element(file_path, target_parameter, target_value, action_name, action_value, step_data):
    '''
    Function to get the target element(s) as per 'action'
    ''' 
    sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
    CommonUtil.ExecLog(sModuleInfo, "Function: get_target_element", 1)
    try:
        file_tree = []
        #Function to get the XML file tree
        file_tree = get_file_tree(file_path) 

        driver = None
        driver = file_tree[0]
        #Function to get the elements from the XML file
        matching_elements = LE.Get_Element(step_data, driver)
        CommonUtil.ExecLog(sModuleInfo, ">>> The expected attribute value is: '%s'" %action_value, 1)

        #Function to update the target element
        returned_target_element = update_target_element(file_path, file_tree[1], matching_elements, target_parameter, target_value, action_name, action_value) 

        return returned_target_element   

    except Exception:
        return CommonUtil.Exception_Handler(sys.exc_info())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号