eschutho commented on code in PR #23290: URL: https://github.com/apache/superset/pull/23290#discussion_r1130290074
########## superset/utils/webdriver.py: ########## @@ -176,22 +176,46 @@ def get_screenshot( sleep(selenium_headstart) try: - logger.debug("Wait for the presence of %s", element_name) - element = WebDriverWait(driver, self._screenshot_locate_wait).until( - EC.presence_of_element_located((By.CLASS_NAME, element_name)) - ) + try: + # page didn't load + logger.debug( + "Wait for the presence of %s at url: %s", element_name, url + ) + element = WebDriverWait(driver, self._screenshot_locate_wait).until( + EC.presence_of_element_located((By.CLASS_NAME, element_name)) + ) + except TimeoutException as ex: + logger.exception("Selenium timed out requesting url %s", url) + raise ex - logger.debug("Wait for chart containers to draw") - WebDriverWait(driver, self._screenshot_locate_wait).until( - EC.visibility_of_all_elements_located( - (By.CLASS_NAME, "slice_container") + try: + # chart containers didn't render + logger.debug("Wait for chart containers to draw at url: %s", url) + WebDriverWait(driver, self._screenshot_locate_wait).until( + EC.visibility_of_all_elements_located( + (By.CLASS_NAME, "slice_container") + ) Review Comment: This is one area where I think a warning may make sense. @craig-rueda what do you think here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org