#Robot/UIOSelector_Added|title_re|rich_text_re|class_name_re|friendly_class_name_re|control_type_re

#TODO Сейчас если указан ctrl_index, то title_re не проверяется, тк удаляется (подумать, может его не надо удалять)
Signed-off-by: Ivan Maslov <i.maslov@mail.ru>
dev-linux
Ivan Maslov 5 years ago
parent bee9248237
commit f8973b70da

@ -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:

@ -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 @@
<div class="row">
<div class="eight wide column">
<div class="ui tiny header" style="margin-bottom:0px;">Edit GUI selector</div>
<b style="font-size:10px;color: #797979;" >[{depth_start: &lt1+&gt, depth_end: &lt1+&gt, index|ctrl_index: &lt0+&gt, title: &ltstr&gt, rich_text: &ltstr&gt, class_name: &ltstr&gt, friendly_class_name: &ltstr&gt, control_type: &ltstr&gt}]</b>
<b style="font-size:10px;color: #797979;" >[{depth_start: &lt1+&gt, depth_end: &lt1+&gt, index|ctrl_index: &lt0+&gt, title: &ltstr&gt, title_re: &ltstr re pattern&gt, rich_text: &ltstr&gt, rich_text_re: &ltstr re pattern&gt, class_name: &ltstr&gt, class_name_re: &ltstr re pattern&gt, friendly_class_name: &ltstr&gt, friendly_class_name_re: &ltstr re pattern&gt, control_type: &ltstr&gt, control_type_re: &ltstr re pattern&gt}]</b>
<textarea style="width:100%; font-size:12pt" class="rpa-gui-selector" rows="6" cols="60"></textarea>
<button class="large ui blue button rpa-action-highlight" onclick="mGlobal.ElementHighlightNewGUISelectorString($('.rpa-gui-selector')[0].value);">Highlight element</button>
<button class="large ui grey button rpa-action-validate" onclick="mGlobal.ElementValidateGUISelectorString($('.rpa-gui-selector')[0].value);">Validate element</button>

Loading…
Cancel
Save