diff --git a/tests/resources/Harbor-Pages/Project-Helmcharts.robot b/tests/resources/Harbor-Pages/Project-Helmcharts.robot index 2b043b2a3..9a9d1c8ef 100644 --- a/tests/resources/Harbor-Pages/Project-Helmcharts.robot +++ b/tests/resources/Harbor-Pages/Project-Helmcharts.robot @@ -46,5 +46,12 @@ Go Back To Versions And Delete Retry Element Click xpath=${version_bread_crumbs} Retry Element Click xpath=${version_checkbox} Retry Element Click xpath=${version_delete} - Retry Element Click xpath=${version_confirm_delete} - Retry Wait Until Page Contains Element xpath=${helmchart_content} \ No newline at end of file + :For ${n} IN RANGE 1 6 + \ Log To Console Trying Go Back To Versions And Delete ${n} times ... + \ Retry Element Click xpath=${version_confirm_delete} + \ Capture Page Screenshot + \ ${out} Run Keyword And Ignore Error Retry Wait Until Page Contains Element xpath=${helmchart_content} + \ Capture Page Screenshot + \ Log To Console Return value is ${out[0]} + \ Exit For Loop If '${out[0]}'=='PASS' + \ Sleep 1 diff --git a/tests/resources/Harbor-Pages/ToolKit.robot b/tests/resources/Harbor-Pages/ToolKit.robot index 9e280e67a..4027d595e 100644 --- a/tests/resources/Harbor-Pages/ToolKit.robot +++ b/tests/resources/Harbor-Pages/ToolKit.robot @@ -23,23 +23,21 @@ ${HARBOR_VERSION} v1.1.1 Delete Success [Arguments] @{obj} :For ${obj} in @{obj} - \ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='success-standard'] + \ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='success-standard'] Sleep 1 Capture Page Screenshot Delete Fail [Arguments] @{obj} :For ${obj} in @{obj} - \ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='error-standard'] + \ Retry Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape='error-standard'] Sleep 1 Capture Page Screenshot Filter Object #Filter project repo user tag. [Arguments] ${kw} - ${element}= Set Variable xpath=//hbr-filter//clr-icon - Wait Until Element Is Visible And Enabled ${element} - Click Element ${element} + Retry Element Click xpath=//hbr-filter//clr-icon ${element}= Set Variable xpath=//hbr-filter//input Wait Until Element Is Visible And Enabled ${element} Input Text ${element} ${kw} @@ -48,9 +46,7 @@ Filter Object Select Object #select single element such as user project repo tag [Arguments] ${obj} - ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label - Wait Until Element Is Visible And Enabled ${element} - Click Element ${element} + Retry Element Click xpath=//clr-dg-row[contains(.,'${obj}')]//label # This func cannot support as the delete user flow changed. Multi-delete Object @@ -58,10 +54,13 @@ Multi-delete Object :For ${obj} in @{obj} \ ${element}= Set Variable xpath=//clr-dg-row[contains(.,'${obj}')]//label \ Retry Element Click ${element} + Sleep 1 Capture Page Screenshot Retry Element Click ${repo_delete_btn} + Sleep 1 Capture Page Screenshot Retry Element Click ${repo_delete_on_card_view_btn} + Sleep 1 Capture Page Screenshot Sleep 1