fix: handle disabled buttons and add Italian UI language support - #14
Open
chrisdaloa wants to merge 1 commit into
Open
fix: handle disabled buttons and add Italian UI language support#14chrisdaloa wants to merge 1 commit into
chrisdaloa wants to merge 1 commit into
Conversation
- Skip buttons with disabled/aria-disabled attributes before clicking, wait for them to become enabled instead of raising an exception - Fall back to JS click (execute_script) when ElementClickInterceptedException is raised due to an overlay blocking the element - Add Italian button text variants to support ESET interface in Italian: 'continua' alongside 'continue', and 'termina per ora'/'finisci per ora' alongside 'finish for now' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two related issues when running with an Italian-language ESET interface:
ElementClickInterceptedException— the Continue button is found but hasaria-disabled="true"/disabledat the moment of the click (the previous step hasn't finished enabling it yet). An overlay (div.css-we0usu) also intercepts the click in some page states.Italian interface not supported —
__press_button_with_textonly matched exact English strings ('continue','finish for now'), so users whose ESET HOME interface is in Italian always hit theRuntimeError.Changes
modules/EsetTools.py—__press_button_with_textdisabledattribute oraria-disabled="true") and retries on the next iteration instead of raising immediately.element.click()raises any exception (e.g.ElementClickInterceptedExceptionfrom an overlay), falls back todriver.execute_script("arguments[0].click()", button).'continue'→['continue', 'continua']'finish for now'→['finish for now', 'termina per ora', 'finisci per ora']Testing
Verified on Chrome 149 with ESET HOME interface set to Italian — key generation completes without
ElementClickInterceptedExceptionorRuntimeError.