Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIA/SearchField: catch COMError when attempting to look for search fields #10492

Merged
merged 3 commits into from
Nov 18, 2019

Conversation

josephsl
Copy link
Collaborator

Link to issue number:

Fixes #10422

Summary of the issue:

In Windows 10, error tone is heard when navigating through pages in Settings, as well as when opening emoji panel.

Description of how this pull request fixes the issue:

Catch COMError thrown when attempting to add overlay class for search fields.

Testing performed:

Tested via Windows 10 App Essentials add-on and on source code version to make sure error tone is no longer heard.

Known issues with pull request:

None

Change log entry:

None

Additional context:

Although #10397 will catch this and resolve this at the UIA handler thread level, it is sometimes useful to figure out the root cause of issues, hence this pull request.

…elds. Re nvaccess#10422

Error thrown by Comtypes: COMError thrown when attempting to look for search fields. Therefore wrap this inside a try/except block. This resolves error tones heard when one navigates through Windows 10 Settings categories and subpages.
@josephsl josephsl requested a review from LeonarddeR November 14, 2019 16:44
if self.UIAElement.cachedAutomationID in ("SearchTextBox", "TextBox"):
clsList.append(SearchField)
except COMError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should still be logged.

@josephsl
Copy link
Collaborator Author

josephsl commented Nov 14, 2019 via email

…s#10422.

Recommended by Leonard de Ruijter: record a log when COMError is thrown when locating search field objects.
@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit 4e2c69f873

@michaelDCurran michaelDCurran merged commit d13635d into nvaccess:master Nov 18, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Nov 18, 2019
@josephsl josephsl deleted the i10422searchFieldCOMError branch August 10, 2020 04:25
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.

NVDA generates error tones when opening categories and subcategories in Windows Settings
5 participants