Skip to content

Suppress only the expected errors from the retried dialog click - #1532

Merged
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1490
Aug 27, 2026
Merged

Suppress only the expected errors from the retried dialog click#1532
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-web-tools-issue-1490

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Aug 26, 2026

Copy link
Copy Markdown
Member

Closes #1490.

_open_add_database_dialog clicks the add-database button, then clicks it a second time inside contextlib.suppress(WebDriverException) because the dialog sometimes does not open on the first click. WebDriverException is the base of the entire Selenium exception hierarchy, so that suppressed everything — a dead session, a browser crash, a chromedriver protocol error — and turned it into the 30 second timeout on the next wait, with no trace of the real cause.

It now suppresses only the three errors that mean the first click did open the dialog: the button is covered by the dialog (ElementClickInterceptedException), hidden (ElementNotInteractableException), or gone from the DOM (StaleElementReferenceException). Anything else propagates.

I checked which one actually fires, against the real target manager — click the button, then click the same element again:

first click ok
second click raised: selenium.common.exceptions.ElementClickInterceptedException
  message: element click intercepted: Element <button class="btn" id="add-dialog-btn" ...>
           is not clickable at point (1407, 186). Other elem...
dialog name field present: True

So the common path is ElementClickInterceptedException, which is in the suppressed set, and the dialog is open afterwards as expected. The other two are kept for the variants where the portal hides or re-renders the button instead of covering it.

WebDriverException is no longer imported.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM

Closes #1490

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM
@adamtheturtle
adamtheturtle merged commit 7f8e0ea into main Aug 27, 2026
29 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vws-web-tools-issue-1490 branch August 27, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_open_add_database_dialog swallows all WebDriverException on double-click

1 participant