From b3c3d04a386a5610a49e4974e1d19745651e0d96 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Thu, 6 Mar 2025 12:23:21 +0530 Subject: update xpath for the save button add more elements to the try block --- .../eda-frontend/src/static/gallery/gallery104.png | Bin 39142 -> 39093 bytes .../eda-frontend/src/static/gallery/gallery105.png | Bin 38816 -> 38901 bytes .../eda-frontend/src/static/gallery/gallery106.png | Bin 38885 -> 38908 bytes .../eda-frontend/src/static/gallery/gallery107.png | Bin 33546 -> 33783 bytes .../eda-frontend/src/static/gallery/gallery126.png | Bin 40771 -> 40910 bytes .../eda-frontend/src/static/gallery/gallery149.png | Bin 153692 -> 153683 bytes .../eda-frontend/src/static/gallery/gallery21.png | Bin 38655 -> 43440 bytes .../eda-frontend/src/static/gallery/gallery22.png | Bin 41232 -> 46188 bytes .../eda-frontend/src/static/gallery/gallery23.png | Bin 38655 -> 43440 bytes .../eda-frontend/src/static/gallery/gallery24.png | Bin 36499 -> 41071 bytes .../eda-frontend/src/static/gallery/gallery25.png | Bin 38655 -> 43440 bytes .../eda-frontend/src/static/gallery/gallery26.png | Bin 34977 -> 39769 bytes .../eda-frontend/src/static/gallery/gallery27.png | Bin 35938 -> 41127 bytes .../eda-frontend/src/static/gallery/gallery28.png | Bin 39958 -> 44425 bytes .../eda-frontend/src/static/gallery/gallery29.png | Bin 42535 -> 46427 bytes .../eda-frontend/src/static/gallery/gallery30.png | Bin 42535 -> 46427 bytes .../eda-frontend/src/static/gallery/gallery31.png | Bin 31400 -> 34817 bytes .../eda-frontend/src/static/gallery/gallery32.png | Bin 39785 -> 44401 bytes .../eda-frontend/src/static/gallery/gallery33.png | Bin 44235 -> 51516 bytes .../eda-frontend/src/static/gallery/gallery34.png | Bin 40291 -> 45256 bytes .../eda-frontend/src/static/gallery/gallery35.png | Bin 35860 -> 42583 bytes .../eda-frontend/src/static/gallery/gallery36.png | Bin 35860 -> 42583 bytes .../eda-frontend/src/static/gallery/gallery37.png | Bin 37071 -> 40690 bytes .../eda-frontend/src/static/gallery/gallery38.png | Bin 37071 -> 40690 bytes .../eda-frontend/src/static/gallery/gallery39.png | Bin 38724 -> 43459 bytes .../eda-frontend/src/static/gallery/gallery40.png | Bin 38724 -> 43459 bytes .../eda-frontend/src/static/gallery/gallery41.png | Bin 36081 -> 41091 bytes .../eda-frontend/src/static/gallery/gallery70.png | Bin 59228 -> 59247 bytes .../eda-frontend/src/static/gallery/gallery85.png | Bin 43310 -> 43313 bytes blocks/open_editor.py | 24 ++++++++++++++------- 30 files changed, 16 insertions(+), 8 deletions(-) diff --git a/blocks/eda-frontend/src/static/gallery/gallery104.png b/blocks/eda-frontend/src/static/gallery/gallery104.png index dd9b36e6..4ebb84a9 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery104.png and b/blocks/eda-frontend/src/static/gallery/gallery104.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery105.png b/blocks/eda-frontend/src/static/gallery/gallery105.png index f000a73a..8600235a 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery105.png and b/blocks/eda-frontend/src/static/gallery/gallery105.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery106.png b/blocks/eda-frontend/src/static/gallery/gallery106.png index 6aaf12c9..f2255932 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery106.png and b/blocks/eda-frontend/src/static/gallery/gallery106.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery107.png b/blocks/eda-frontend/src/static/gallery/gallery107.png index 134ec613..0cad0d0f 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery107.png and b/blocks/eda-frontend/src/static/gallery/gallery107.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery126.png b/blocks/eda-frontend/src/static/gallery/gallery126.png index e6042f94..6cff510c 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery126.png and b/blocks/eda-frontend/src/static/gallery/gallery126.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery149.png b/blocks/eda-frontend/src/static/gallery/gallery149.png index 8e9f0107..6dbe53c2 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery149.png and b/blocks/eda-frontend/src/static/gallery/gallery149.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery21.png b/blocks/eda-frontend/src/static/gallery/gallery21.png index 5d5e37eb..349928cb 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery21.png and b/blocks/eda-frontend/src/static/gallery/gallery21.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery22.png b/blocks/eda-frontend/src/static/gallery/gallery22.png index 0ade171d..df2520cd 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery22.png and b/blocks/eda-frontend/src/static/gallery/gallery22.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery23.png b/blocks/eda-frontend/src/static/gallery/gallery23.png index 5d5e37eb..349928cb 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery23.png and b/blocks/eda-frontend/src/static/gallery/gallery23.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery24.png b/blocks/eda-frontend/src/static/gallery/gallery24.png index 2eb74e65..65f1b852 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery24.png and b/blocks/eda-frontend/src/static/gallery/gallery24.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery25.png b/blocks/eda-frontend/src/static/gallery/gallery25.png index 5d5e37eb..349928cb 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery25.png and b/blocks/eda-frontend/src/static/gallery/gallery25.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery26.png b/blocks/eda-frontend/src/static/gallery/gallery26.png index eb413fb2..0318e6b8 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery26.png and b/blocks/eda-frontend/src/static/gallery/gallery26.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery27.png b/blocks/eda-frontend/src/static/gallery/gallery27.png index c85e3b1e..1cf8ba7c 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery27.png and b/blocks/eda-frontend/src/static/gallery/gallery27.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery28.png b/blocks/eda-frontend/src/static/gallery/gallery28.png index fb8749c1..b2cb8985 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery28.png and b/blocks/eda-frontend/src/static/gallery/gallery28.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery29.png b/blocks/eda-frontend/src/static/gallery/gallery29.png index a98d04e7..4047b5de 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery29.png and b/blocks/eda-frontend/src/static/gallery/gallery29.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery30.png b/blocks/eda-frontend/src/static/gallery/gallery30.png index a98d04e7..4047b5de 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery30.png and b/blocks/eda-frontend/src/static/gallery/gallery30.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery31.png b/blocks/eda-frontend/src/static/gallery/gallery31.png index a177124a..8a95649c 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery31.png and b/blocks/eda-frontend/src/static/gallery/gallery31.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery32.png b/blocks/eda-frontend/src/static/gallery/gallery32.png index a076461f..cb0f211f 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery32.png and b/blocks/eda-frontend/src/static/gallery/gallery32.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery33.png b/blocks/eda-frontend/src/static/gallery/gallery33.png index 8da0c4b4..7b1fc6f1 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery33.png and b/blocks/eda-frontend/src/static/gallery/gallery33.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery34.png b/blocks/eda-frontend/src/static/gallery/gallery34.png index 03e934ed..c59b4738 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery34.png and b/blocks/eda-frontend/src/static/gallery/gallery34.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery35.png b/blocks/eda-frontend/src/static/gallery/gallery35.png index bc7c9048..8cbad317 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery35.png and b/blocks/eda-frontend/src/static/gallery/gallery35.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery36.png b/blocks/eda-frontend/src/static/gallery/gallery36.png index bc7c9048..8cbad317 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery36.png and b/blocks/eda-frontend/src/static/gallery/gallery36.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery37.png b/blocks/eda-frontend/src/static/gallery/gallery37.png index 89e80f5e..5559f5a6 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery37.png and b/blocks/eda-frontend/src/static/gallery/gallery37.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery38.png b/blocks/eda-frontend/src/static/gallery/gallery38.png index 89e80f5e..5559f5a6 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery38.png and b/blocks/eda-frontend/src/static/gallery/gallery38.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery39.png b/blocks/eda-frontend/src/static/gallery/gallery39.png index 3235dce4..db755483 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery39.png and b/blocks/eda-frontend/src/static/gallery/gallery39.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery40.png b/blocks/eda-frontend/src/static/gallery/gallery40.png index 3235dce4..db755483 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery40.png and b/blocks/eda-frontend/src/static/gallery/gallery40.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery41.png b/blocks/eda-frontend/src/static/gallery/gallery41.png index 60bbbe71..f16db833 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery41.png and b/blocks/eda-frontend/src/static/gallery/gallery41.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery70.png b/blocks/eda-frontend/src/static/gallery/gallery70.png index a4bf920d..442d9b72 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery70.png and b/blocks/eda-frontend/src/static/gallery/gallery70.png differ diff --git a/blocks/eda-frontend/src/static/gallery/gallery85.png b/blocks/eda-frontend/src/static/gallery/gallery85.png index 13a810d3..f6e8cc64 100644 Binary files a/blocks/eda-frontend/src/static/gallery/gallery85.png and b/blocks/eda-frontend/src/static/gallery/gallery85.png differ diff --git a/blocks/open_editor.py b/blocks/open_editor.py index 4e54b46b..243ba7ff 100644 --- a/blocks/open_editor.py +++ b/blocks/open_editor.py @@ -141,28 +141,36 @@ def main(): button.click() driver.switch_to.window(driver.window_handles[-1]) # Switch to the newly opened editor tab/window - # Wait for the page to load and the Save button to be clickable - save_button = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="root"]/div/header/div[2]/button[3]'))) + try: + state = 0 - # Wait for the gallery to fully load - wait_for_gallery_load() + # Wait for the page to load and the Save button to be clickable + save_button = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="root"]/div/header/div[2]/div[1]/button[2]'))) + state += 1 - # Click the "Save" button - ActionChains(driver).move_to_element(save_button).click().perform() + # Wait for the gallery to fully load + wait_for_gallery_load() + state += 1 + + # Click the "Save" button + ActionChains(driver).move_to_element(save_button).click().perform() + state += 1 - try: # Optionally, you can verify the snackbar message if needed wait.until(EC.visibility_of_element_located((By.CLASS_NAME, "MuiSnackbar-root"))) + state += 1 # Verify the share button is displayed wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="root"]/div/header/div[1]/button[2]'))) + state += 1 # Verify the "last saved" text is displayed last_saved_text = wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="root"]/div/header/div[1]/p'))) + state += 1 savecount += 1 print(f"[{i + 1:3d}/{count}]: {last_saved_text.text}") except Exception: - print(f"[{i + 1:3d}/{count}]: Error while saving diagram") + print(f"[{i + 1:3d}/{count}]: Error while saving diagram {state}") # Close the editor tab/window and switch back to the gallery driver.close() -- cgit