craig-rueda commented on code in PR #23290:
URL: https://github.com/apache/superset/pull/23290#discussion_r1127233274
##########
superset/utils/webdriver.py:
##########
@@ -176,22 +176,42 @@ 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", element_name)
+ 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")
Review Comment:
Maybe add a little more detail to these `debug` statements, such as the
`url` in order to aid debugging?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]