fix: change order of webdriver timeout checks (#22698)

This commit is contained in:
Elizabeth Thompson
2023-01-17 10:00:51 -08:00
committed by GitHub
parent edcbf597f5
commit 0a2fc9cdde
2 changed files with 9 additions and 6 deletions

View File

@@ -177,16 +177,19 @@ class WebDriverProxy:
element = WebDriverWait(driver, self._screenshot_locate_wait).until(
EC.presence_of_element_located((By.CLASS_NAME, element_name))
)
logger.debug("Wait for .loading to be done")
WebDriverWait(driver, self._screenshot_load_wait).until_not(
EC.presence_of_all_elements_located((By.CLASS_NAME, "loading"))
)
logger.debug("Wait for chart to have content")
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")
)
)
logger.debug("Wait for loading element of charts to be gone")
WebDriverWait(driver, self._screenshot_load_wait).until_not(
EC.presence_of_all_elements_located((By.CLASS_NAME, "loading"))
)
selenium_animation_wait = current_app.config[
"SCREENSHOT_SELENIUM_ANIMATION_WAIT"
]