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