diff options
author | Sunil Shetye | 2025-03-06 12:23:21 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-03-06 13:03:21 +0530 |
commit | b3c3d04a386a5610a49e4974e1d19745651e0d96 (patch) | |
tree | a63582a0197bba2c3807ad2ed7a3f467dd11fb91 | |
parent | abaa764030e96158c1a2ba109b060fa4c0cf2054 (diff) | |
download | Common-Interface-Project-b3c3d04a386a5610a49e4974e1d19745651e0d96.tar.gz Common-Interface-Project-b3c3d04a386a5610a49e4974e1d19745651e0d96.tar.bz2 Common-Interface-Project-b3c3d04a386a5610a49e4974e1d19745651e0d96.zip |
update xpath for the save button
add more elements to the try block
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 Binary files differindex dd9b36e6..4ebb84a9 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery104.png +++ b/blocks/eda-frontend/src/static/gallery/gallery104.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery105.png b/blocks/eda-frontend/src/static/gallery/gallery105.png Binary files differindex f000a73a..8600235a 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery105.png +++ b/blocks/eda-frontend/src/static/gallery/gallery105.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery106.png b/blocks/eda-frontend/src/static/gallery/gallery106.png Binary files differindex 6aaf12c9..f2255932 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery106.png +++ b/blocks/eda-frontend/src/static/gallery/gallery106.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery107.png b/blocks/eda-frontend/src/static/gallery/gallery107.png Binary files differindex 134ec613..0cad0d0f 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery107.png +++ b/blocks/eda-frontend/src/static/gallery/gallery107.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery126.png b/blocks/eda-frontend/src/static/gallery/gallery126.png Binary files differindex e6042f94..6cff510c 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery126.png +++ b/blocks/eda-frontend/src/static/gallery/gallery126.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery149.png b/blocks/eda-frontend/src/static/gallery/gallery149.png Binary files differindex 8e9f0107..6dbe53c2 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery149.png +++ b/blocks/eda-frontend/src/static/gallery/gallery149.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery21.png b/blocks/eda-frontend/src/static/gallery/gallery21.png Binary files differindex 5d5e37eb..349928cb 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery21.png +++ b/blocks/eda-frontend/src/static/gallery/gallery21.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery22.png b/blocks/eda-frontend/src/static/gallery/gallery22.png Binary files differindex 0ade171d..df2520cd 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery22.png +++ b/blocks/eda-frontend/src/static/gallery/gallery22.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery23.png b/blocks/eda-frontend/src/static/gallery/gallery23.png Binary files differindex 5d5e37eb..349928cb 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery23.png +++ b/blocks/eda-frontend/src/static/gallery/gallery23.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery24.png b/blocks/eda-frontend/src/static/gallery/gallery24.png Binary files differindex 2eb74e65..65f1b852 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery24.png +++ b/blocks/eda-frontend/src/static/gallery/gallery24.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery25.png b/blocks/eda-frontend/src/static/gallery/gallery25.png Binary files differindex 5d5e37eb..349928cb 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery25.png +++ b/blocks/eda-frontend/src/static/gallery/gallery25.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery26.png b/blocks/eda-frontend/src/static/gallery/gallery26.png Binary files differindex eb413fb2..0318e6b8 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery26.png +++ b/blocks/eda-frontend/src/static/gallery/gallery26.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery27.png b/blocks/eda-frontend/src/static/gallery/gallery27.png Binary files differindex c85e3b1e..1cf8ba7c 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery27.png +++ b/blocks/eda-frontend/src/static/gallery/gallery27.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery28.png b/blocks/eda-frontend/src/static/gallery/gallery28.png Binary files differindex fb8749c1..b2cb8985 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery28.png +++ b/blocks/eda-frontend/src/static/gallery/gallery28.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery29.png b/blocks/eda-frontend/src/static/gallery/gallery29.png Binary files differindex a98d04e7..4047b5de 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery29.png +++ b/blocks/eda-frontend/src/static/gallery/gallery29.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery30.png b/blocks/eda-frontend/src/static/gallery/gallery30.png Binary files differindex a98d04e7..4047b5de 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery30.png +++ b/blocks/eda-frontend/src/static/gallery/gallery30.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery31.png b/blocks/eda-frontend/src/static/gallery/gallery31.png Binary files differindex a177124a..8a95649c 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery31.png +++ b/blocks/eda-frontend/src/static/gallery/gallery31.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery32.png b/blocks/eda-frontend/src/static/gallery/gallery32.png Binary files differindex a076461f..cb0f211f 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery32.png +++ b/blocks/eda-frontend/src/static/gallery/gallery32.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery33.png b/blocks/eda-frontend/src/static/gallery/gallery33.png Binary files differindex 8da0c4b4..7b1fc6f1 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery33.png +++ b/blocks/eda-frontend/src/static/gallery/gallery33.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery34.png b/blocks/eda-frontend/src/static/gallery/gallery34.png Binary files differindex 03e934ed..c59b4738 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery34.png +++ b/blocks/eda-frontend/src/static/gallery/gallery34.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery35.png b/blocks/eda-frontend/src/static/gallery/gallery35.png Binary files differindex bc7c9048..8cbad317 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery35.png +++ b/blocks/eda-frontend/src/static/gallery/gallery35.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery36.png b/blocks/eda-frontend/src/static/gallery/gallery36.png Binary files differindex bc7c9048..8cbad317 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery36.png +++ b/blocks/eda-frontend/src/static/gallery/gallery36.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery37.png b/blocks/eda-frontend/src/static/gallery/gallery37.png Binary files differindex 89e80f5e..5559f5a6 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery37.png +++ b/blocks/eda-frontend/src/static/gallery/gallery37.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery38.png b/blocks/eda-frontend/src/static/gallery/gallery38.png Binary files differindex 89e80f5e..5559f5a6 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery38.png +++ b/blocks/eda-frontend/src/static/gallery/gallery38.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery39.png b/blocks/eda-frontend/src/static/gallery/gallery39.png Binary files differindex 3235dce4..db755483 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery39.png +++ b/blocks/eda-frontend/src/static/gallery/gallery39.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery40.png b/blocks/eda-frontend/src/static/gallery/gallery40.png Binary files differindex 3235dce4..db755483 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery40.png +++ b/blocks/eda-frontend/src/static/gallery/gallery40.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery41.png b/blocks/eda-frontend/src/static/gallery/gallery41.png Binary files differindex 60bbbe71..f16db833 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery41.png +++ b/blocks/eda-frontend/src/static/gallery/gallery41.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery70.png b/blocks/eda-frontend/src/static/gallery/gallery70.png Binary files differindex a4bf920d..442d9b72 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery70.png +++ b/blocks/eda-frontend/src/static/gallery/gallery70.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery85.png b/blocks/eda-frontend/src/static/gallery/gallery85.png Binary files differindex 13a810d3..f6e8cc64 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery85.png +++ b/blocks/eda-frontend/src/static/gallery/gallery85.png 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() |