summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyword/common/page.robot23
1 files changed, 13 insertions, 10 deletions
diff --git a/keyword/common/page.robot b/keyword/common/page.robot
index 7e9a38a..f3b3ab1 100644
--- a/keyword/common/page.robot
+++ b/keyword/common/page.robot
@@ -437,7 +437,8 @@ OpenCreateOREdit
${len} Run Keyword If "${type}" == "open" Set Variable ${openLen}
... ELSE Set Variable ${len}
FOR ${var} IN RANGE ${len}
- Wait Until Element Is Enabled ${menuIdList}[${var}] ${sleep_Wait}
+ Wait Element ${menuIdList}[${var}]
+ #Wait Until Element Is Enabled ${menuIdList}[${var}] ${sleep_Wait}
sleep ${sleep_min}
click element ${menuIdList}[${var}]
#判断页面是否弹出是否保存提示框
@@ -460,6 +461,7 @@ Operation
Run Keyword If "${type}" == "inputClick" run keywords log 适用于先输入文本后点击按钮操作
... AND log ${recursionPosition}
... AND sleep ${sleep_min} #两重等待防止网络问题导致点击创建按钮但是迟迟没有打开创建页面。
+ ... AND Wait Element ${positioning}
... AND input text ${positioning} ${dataValue}
... AND CLickAffirm ${default} ${recursionPosition}
Run Keyword If "${type}" == "clickJointPosition" run keywords log 点击拼接定位
@@ -709,9 +711,9 @@ OperatCombinationPolicyObjects
${dataKey} get dictionary keys ${i}
${typePosition} Set Variable if "${dataKey}[0]" == "NoGroup" xpath=/html/body/ul[last()]/li[1]
... "${dataKey}[0]" == "Group" xpath=/html/body/ul[last()]/li[2]
- sleep 2
+ Wait Element ${typePosition}
click element ${typePosition}
- sleep 2
+ sleep ${sleep}
${nextDataValue} Get From Dictionary ${i} ${dataKey}[0]
${objectRecursive} Evaluate ${objectRecursive}+${1}
set global variable ${objectRecursive}
@@ -805,7 +807,7 @@ OperatCombinationPolicyObject
${return} ${default} Run Keyword And Ignore Error Get From Dictionary ${re} default
${default} Run Keyword If "${return}"=="FAIL" or "${default}"=="${EMPTY}" set variable null
... ELSE set variable ${default}
- sleep 2
+ sleep ${sleep}
Run keyword if "${value}" == "None" log 无数据不操作
... ELSE Operation ${type} ${elementId} ${value} ${data} default=${default} templateData=${templateData} recursionPosition=${position}
${listType} DataType ${value}
@@ -820,7 +822,7 @@ OperatCombinationObjects
... ${dataValue}: 数据文件中SubObjects下的数据
... ${templateData}: 模板文件中templateData下的数据
#点击侧滑框选择按钮
-
+ Wait Element ${positioning}
click element ${positioning}
#根绝数据文件选择点击NoGroup还是Group
FOR ${i} IN @{dataValue}
@@ -830,9 +832,9 @@ OperatCombinationObjects
${positionGroup} ObjectsNestedPosition objectaddress_group-_subObjects_anonymousComponent_ElFormItem_ElForm_objectsAdd_Home_App_anonymousComponent objectaddress_group-_subObjects_anonymousComponent_ElFormItem_ElForm objectaddress_group-_subObjects_anonymousComponent_ElFormItem_ElForm_objectsAdd
${typePosition} Set Variable if "${dataKey}[0]" == "NoGroup" ${positionNoGroup}
... "${dataKey}[0]" == "Group" ${positionGroup}
- sleep 2
+ Wait Element ${typePosition}
click element id=${typePosition}
- sleep 2
+ sleep ${sleep}
${nextDataValue} Get From Dictionary ${i} ${dataKey}[0]
set global variable ${objectRecursive} ${objectRecursive}+${1}
log ${objectRecursive}
@@ -898,7 +900,7 @@ OperatCombinationObject
${return} ${default} Run Keyword And Ignore Error Get From Dictionary ${re} default
${default} Run Keyword If "${return}"=="FAIL" or "${default}"=="${EMPTY}" set variable null
... ELSE set variable ${default}
- sleep 2
+ sleep ${sleep}
log ${position}
Run keyword if "${value}" == "None" log 无数据不操作
... ELSE Operation ${type} ${elementId} ${value} ${data} default=${default} templateData=${templateData} recursionPosition=${position}
@@ -1044,7 +1046,6 @@ OkOrCancel
Wait Until Keyword Succeeds 3x ${sleep_wait} click element ${okBUutton} #点击OK缇交
Wait Element ${alerm}
#Wait Until Element Is Enabled ${alerm} ${sleep_Wait}
- sleep 4 # 防止数据刷新慢,找不到定位问题
log ${pageName}
${Name} Run Keyword IF "${pageName}" == "ssl_decryption_exclusions" get substring ${assertName} 1 -1
... ELSE Set Variable ${assertName}
@@ -1068,7 +1069,7 @@ SearchOperation
input text ${positioning}[0] ${searchData}
sleep ${sleep}
press keys ${positioning}[0] ENTER
- sleep 3
+ sleep ${sleep}
click element ${positioning}[1]
sleep ${sleep}
@@ -1835,6 +1836,8 @@ RefreshPage
Wait Element
[Arguments] ${element locator}
[Documentation] 等待元素
+ # ${time1} Get Current Date result_format=timestamp
+ # log ${time1}
Wait Until Page Contains Element ${element locator} ${sleep_wait}
Wait Until Element Is Enabled ${element locator} ${sleep_wait}
Wait Until Element Is Visible ${element locator} ${sleep_wait}