From 99bd55a3ff8edc4bfd57ca4a0ab119f3430363d5 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Wed, 23 Oct 2019 20:26:53 +0300 Subject: [PATCH] #UIOSelector+is_enabled+is_visible, #Studio Run Action > Set focus + run action --- v.1.0.2/Robot/GUI.py | 9 +++++++++ v.1.0.2/Studio/Web/Index.xhtml | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/v.1.0.2/Robot/GUI.py b/v.1.0.2/Robot/GUI.py index 8b6c70c0..a572260d 100644 --- a/v.1.0.2/Robot/GUI.py +++ b/v.1.0.2/Robot/GUI.py @@ -172,6 +172,7 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep #Циклический вызов для всех детей со скорректированной спецификацией lResultList.extend(UIOSelector_Get_UIOList(lChildrenItemNewSpecificationList,lChildrenItem,inFlagRaiseException)) #Фильтрация + #TODO Сделать поддержку этих атрибутов для первого уровня селектора if lFlagGoCheck: lFlagAddChild=True #Фильтрация по title @@ -214,6 +215,14 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep if 'control_type_re' in inSpecificationList[0]: if re.fullmatch(inSpecificationList[0]["control_type_re"],lChildrenItem.element_info.control_type) is None: lFlagAddChild=False + #Фильтрация по is_enabled (bool) + if 'is_enabled' in inSpecificationList[0]: + if lChildrenItem.is_enabled()!=inSpecificationList[0]["is_enabled"]: + lFlagAddChild=False + #Фильтрация по is_visible (bool) + if 'is_visible' in inSpecificationList[0]: + if lChildrenItem.is_visible()!=inSpecificationList[0]["is_visible"]: + lFlagAddChild=False ##### #Все проверки пройдены - флаг добавления if lFlagAddChild: diff --git a/v.1.0.2/Studio/Web/Index.xhtml b/v.1.0.2/Studio/Web/Index.xhtml index 82974825..21eb2146 100644 --- a/v.1.0.2/Studio/Web/Index.xhtml +++ b/v.1.0.2/Studio/Web/Index.xhtml @@ -577,8 +577,8 @@ ///Загрузка данных $.ajax({ type: "POST", - url: 'GUIAction', - data: '{"ModuleName":"GUI","ActivityName":"UIOSelectorUIOActivity_Run_Dict","ArgumentList":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}', + url: 'GUIActionList', + data: '[{"ModuleName":"GUI","ActivityName":"UIOSelector_FocusHighlight","ArgumentList":['+lActionElementSpecification+']},{"ModuleName":"GUI","ActivityName":"UIOSelectorUIOActivity_Run_Dict","ArgumentList":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}]', success: function(lData,l2,l3) { @@ -794,7 +794,7 @@
Edit GUI selector
- [{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>}] + [{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>, is_enabled: <bool>, is_visible: <bool>}] @@ -819,7 +819,7 @@

- +
Result