I need to test the Load More button using Do-While Loop in Robot Framework using Selenium. I don't know the syntax of do-while so I used a common syntax in the following code.
My Sample Code Logic
do {
Run Keyword If Run Keyword And Return Status Element Should Be Visible ${PO_FieldLabel}) == FALSE FAIL Item not loaded Properly
} while (Run Keyword And Return Status Element Should Be Visible ${PO_LoadMore_Btn})
My logic is to loop the iteration till the Load More Button ${PO_LoadMore_Btn} is exist. If exist, check the Name Field ${PO_FieldLabel} is exist. Once the Name Field ${PO_FieldLabel} is NOT EXIST, FAIL the test case and skip the loop.