diff --git a/Robot/GUI.py b/Robot/GUI.py index 9ecb44d5..479cf2dc 100644 --- a/Robot/GUI.py +++ b/Robot/GUI.py @@ -17,6 +17,7 @@ import JSONNormalize from threading import Timer import datetime import logging +import re #Создать файл логирования # add filemode="w" to overwrite if not os.path.exists("Reports"): @@ -158,22 +159,42 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep if 'title' in inSpecificationList[0]: if lChildrenItem.element_info.name != inSpecificationList[0]["title"]: lFlagAddChild=False + #Фильтрация по title_re (regexp) + if 'title_re' in inSpecificationList[0]: + if re.fullmatch(inSpecificationList[0]["title_re"],lChildrenItem.element_info.name) is None: + lFlagAddChild=False #Фильтрация по rich_text if 'rich_text' in inSpecificationList[0]: if lChildrenItem.element_info.rich_text != inSpecificationList[0]["rich_text"]: lFlagAddChild=False + #Фильтрация по rich_text_re (regexp) + if 'rich_text_re' in inSpecificationList[0]: + if re.fullmatch(inSpecificationList[0]["rich_text_re"],lChildrenItem.element_info.rich_text) is None: + lFlagAddChild=False #Фильтрация по class_name if 'class_name' in inSpecificationList[0]: if lChildrenItem.element_info.class_name != inSpecificationList[0]["class_name"]: lFlagAddChild=False + #Фильтрация по class_name_re (regexp) + if 'class_name_re' in inSpecificationList[0]: + if re.fullmatch(inSpecificationList[0]["class_name_re"],lChildrenItem.element_info.class_name) is None: + lFlagAddChild=False #Фильтрация по friendly_class_name if 'friendly_class_name' in inSpecificationList[0]: if lChildrenItem.friendly_class_name() != inSpecificationList[0]["friendly_class_name"]: lFlagAddChild=False + #Фильтрация по friendly_class_name_re (regexp) + if 'friendly_class_name_re' in inSpecificationList[0]: + if re.fullmatch(inSpecificationList[0]["friendly_class_name_re"],lChildrenItem.friendly_class_name) is None: + lFlagAddChild=False #Фильтрация по control_type if 'control_type' in inSpecificationList[0]: if lChildrenItem.element_info.control_type != inSpecificationList[0]["control_type"]: lFlagAddChild=False + #Фильтрация по control_type_re (regexp) + if 'control_type_re' in inSpecificationList[0]: + if re.fullmatch(inSpecificationList[0]["control_type_re"],lChildrenItem.element_info.control_type) is None: + lFlagAddChild=False ##### #Все проверки пройдены - флаг добавления if lFlagAddChild: diff --git a/Studio/Web/Index.xhtml b/Studio/Web/Index.xhtml index c1d9abba..aef0fca4 100644 --- a/Studio/Web/Index.xhtml +++ b/Studio/Web/Index.xhtml @@ -143,7 +143,7 @@ ///Очистить дерево mGlobal.ElementTree.fClear(); ///Прогрузить новое дерево - mGlobal.ElementTree.fRender(lStructureToRender); + mGlobal.ElementTree.fRender(lStructureToRender,$(".openrpa-value-backend")[0].value); } }, dataType: "text" @@ -794,7 +794,7 @@
Edit GUI selector
- [{depth_start: <1+>, depth_end: <1+>, index|ctrl_index: <0+>, title: <str>, rich_text: <str>, class_name: <str>, friendly_class_name: <str>, control_type: <str>}] + [{depth_start: <1+>, depth_end: <1+>, index|ctrl_index: <0+>, title: <str>, title_re: <str re pattern>, rich_text: <str>, rich_text_re: <str re pattern>, class_name: <str>, class_name_re: <str re pattern>, friendly_class_name: <str>, friendly_class_name_re: <str re pattern>, control_type: <str>, control_type_re: <str re pattern>}]