diff --git a/tests/resources/Harbor-Pages/Project-Members.robot b/tests/resources/Harbor-Pages/Project-Members.robot index 570c668ac..821cf0a96 100644 --- a/tests/resources/Harbor-Pages/Project-Members.robot +++ b/tests/resources/Harbor-Pages/Project-Members.robot @@ -21,16 +21,17 @@ Resource ../../resources/Util.robot *** Keywords *** Go Into Project [Arguments] ${project} ${has_image}=${true} - Sleep 2 - Retry Wait Element ${search_input} - Input Text ${search_input} ${project} - Retry Wait Until Page Contains ${project} - - #To prevent waiting for a fixed-period of time for page loading and failure caused by exception, we add loop to re-run when - # exception was caught. - ${out} Run Keyword If ${has_image}==${false} Retry Double Keywords When Error Retry Element Click xpath=//*[@id='project-results']//clr-dg-cell[contains(.,'${project}')]/a Wait Until Element Is Visible And Enabled xpath=//clr-dg-placeholder[contains(.,\"We couldn\'t find any repositories!\")] - ... ELSE Retry Double Keywords When Error Retry Element Click xpath=//*[@id='project-results']//clr-dg-cell[contains(.,'${project}')]/a Wait Until Element Is Visible And Enabled xpath=//project-detail//hbr-repository-gridview//clr-dg-cell[contains(.,'${project}/')] - Log To Console ${out} + :For ${n} IN RANGE 1 5 + \ Sleep 2 + \ Retry Wait Element ${search_input} + \ Retry Clear Element Text ${search_input} + \ Input Text ${search_input} ${project} + \ Retry Wait Until Page Contains ${project} + \ ${out} Run Keyword If ${has_image}==${false} Retry Double Keywords When Error Retry Element Click xpath=//*[@id='project-results']//clr-dg-cell[contains(.,'${project}')]/a Wait Until Element Is Visible And Enabled xpath=//clr-dg-placeholder[contains(.,\"We couldn\'t find any repositories!\")] + \ ... ELSE Retry Double Keywords When Error Retry Element Click xpath=//*[@id='project-results']//clr-dg-cell[contains(.,'${project}')]/a Wait Until Element Is Visible And Enabled xpath=//project-detail//hbr-repository-gridview//clr-dg-cell[contains(.,'${project}/')] + \ Log To Console ${out} + \ Run Keyword If ${out} == 'PASS' Exit For Loop + \ Sleep 1 Should Be Equal ${out} 'PASS' Sleep 1