title: Do-While Loop in Robot Framework using Selenium
body: <p>I need to test the Load More button using <strong><code>Do-While Loop</code></strong> in Robot Framework using Selenium. I don't know the syntax of <code>do-while</code> so I used a common syntax in the following code.</p>
  
  <p>My Sample Code Logic</p>
  
  <pre><code>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})
  </code></pre>
  
  <p>My logic is to loop the iteration till the Load More Button <code>${PO_LoadMore_Btn}</code> is exist. If exist, check the Name Field <code>${PO_FieldLabel}</code> is exist. Once the Name Field <code>${PO_FieldLabel}</code> is NOT EXIST, <strong><code>FAIL</code></strong> the test case and skip the loop.</p>