I am trying to complete a do-while loop with the below code. We are waiting for a report to process, and it only shows on the webpage once completed and after clicking the retrieve button. The code,
# Go to list and click retrieve
driver.find_element(By.CSS_SELECTOR, "#j_idt40Lbl").click()
time.sleep(20) # takes a while for their side to run
retrieve = driver.find_element_by_css_selector("#tab_reportList\:listPgFrm\:listPgRetrBtn")
retrieve.click() ### Do this action ###
time.sleep(5)
retrieve.click()
time.sleep(5)
retrieve.click()
time.sleep(3)
# Click report file
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "#tab_reportList\:listPgFrm\:listDataTable_0\:0\:reportLink"))).click()
### Until this is visible ###
#tab_reportList\:listPgFrm\:listDataTable_0\:0\:reportLinkis presented there even before it becomes visible?