Skip to content

Commit

Permalink
fix(reports): Update the element class to wait for when taking a scre…
Browse files Browse the repository at this point in the history
…enshot (#28745)

(cherry picked from commit 020c799)
  • Loading branch information
Vitor-Avila authored and sadpandajoe committed May 29, 2024
1 parent 131308b commit 8d447bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/utils/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def get_screenshot( # pylint: disable=too-many-locals, too-many-statements
try:
# chart containers didn't render
logger.debug("Wait for chart containers to draw at url: %s", url)
slice_container_locator = page.locator(".slice_container")
slice_container_locator = page.locator(".chart-container")
slice_container_locator.first.wait_for()
for slice_container_elem in slice_container_locator.all():
slice_container_elem.wait_for()
Expand Down Expand Up @@ -377,7 +377,7 @@ def get_screenshot(self, url: str, element_name: str, user: User) -> bytes | Non
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")
(By.CLASS_NAME, "chart-container")
)
)
except TimeoutException as ex:
Expand Down

0 comments on commit 8d447bf

Please sign in to comment.