#UIOSelector+is_enabled+is_visible, #Studio Run Action > Set focus + run action

dev-linux
Ivan Maslov 5 years ago
parent 98c52ad11b
commit 99bd55a3ff

@ -172,6 +172,7 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep
#Циклический вызов для всех детей со скорректированной спецификацией #Циклический вызов для всех детей со скорректированной спецификацией
lResultList.extend(UIOSelector_Get_UIOList(lChildrenItemNewSpecificationList,lChildrenItem,inFlagRaiseException)) lResultList.extend(UIOSelector_Get_UIOList(lChildrenItemNewSpecificationList,lChildrenItem,inFlagRaiseException))
#Фильтрация #Фильтрация
#TODO Сделать поддержку этих атрибутов для первого уровня селектора
if lFlagGoCheck: if lFlagGoCheck:
lFlagAddChild=True lFlagAddChild=True
#Фильтрация по title #Фильтрация по title
@ -214,6 +215,14 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep
if 'control_type_re' in inSpecificationList[0]: if 'control_type_re' in inSpecificationList[0]:
if re.fullmatch(inSpecificationList[0]["control_type_re"],lChildrenItem.element_info.control_type) is None: if re.fullmatch(inSpecificationList[0]["control_type_re"],lChildrenItem.element_info.control_type) is None:
lFlagAddChild=False 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: if lFlagAddChild:

@ -577,8 +577,8 @@
///Загрузка данных ///Загрузка данных
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: 'GUIAction', url: 'GUIActionList',
data: '{"ModuleName":"GUI","ActivityName":"UIOSelectorUIOActivity_Run_Dict","ArgumentList":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}', data: '[{"ModuleName":"GUI","ActivityName":"UIOSelector_FocusHighlight","ArgumentList":['+lActionElementSpecification+']},{"ModuleName":"GUI","ActivityName":"UIOSelectorUIOActivity_Run_Dict","ArgumentList":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}]',
success: success:
function(lData,l2,l3) function(lData,l2,l3)
{ {
@ -794,7 +794,7 @@
<div class="row"> <div class="row">
<div class="eight wide column"> <div class="eight wide column">
<div class="ui tiny header" style="margin-bottom:0px;">Edit GUI selector</div> <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, 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> <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, is_enabled: &ltbool&gt, is_visible: &ltbool&gt}]</b>
<textarea style="width:100%; font-size:12pt" class="rpa-gui-selector" rows="6" cols="60"></textarea> <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 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> <button class="large ui grey button rpa-action-validate" onclick="mGlobal.ElementValidateGUISelectorString($('.rpa-gui-selector')[0].value);">Validate element</button>
@ -819,7 +819,7 @@
<input type="text" placeholder="[GUAActionArg1, GUAActionArg2...]" class="rpa-argument-list"> <input type="text" placeholder="[GUAActionArg1, GUAActionArg2...]" class="rpa-argument-list">
</div> </div>
<p></p> <p></p>
<button class="large ui green button" onclick="mGlobal.GUIActionRun();">Run action</button> <button class="large ui green button" onclick="mGlobal.GUIActionRun();">Set focus + Run action</button>
<button class="large ui grey button" onclick="mGlobal.GUIActionAddToList();">+ Code list</button> <button class="large ui grey button" onclick="mGlobal.GUIActionAddToList();">+ Code list</button>
<div class="ui tiny header">Result</div> <div class="ui tiny header">Result</div>
<div class="content gui-result"></div> <div class="content gui-result"></div>

Loading…
Cancel
Save