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 objects: recognize more UIA dialogs via more class names and IsDialog property in Windows 10 Redstone 5 #8473
Changes from 2 commits
96e5d79
a784ef9
0f65632
98d7b8a
be8c81e
5ee8f84
07151d6
be5b523
79f3b20
c21426e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -789,7 +789,15 @@ def findOverlayClasses(self,clsList): | |
elif UIAControlType==UIAHandler.UIA_ListItemControlTypeId: | ||
clsList.append(ListItem) | ||
# #5942: In Windows 10 build 14332 and later, Microsoft rewrote various dialog code including that of User Account Control. | ||
if self.UIAIsWindowElement and UIAClassName in ("#32770","NUIDialog", "Credential Dialog Xaml Host"): | ||
# #8405: there are more dialogs scattered throughout Windows 10 and various apps. | ||
# Apart from "popup" dialog seen when uninstaling apps and such, they are window elements (popup dialog isn't). | ||
# Dialog detection is a bit easier on build 17682 and later thanks to IsDialog property. | ||
try: | ||
isDialog = self._getUIACacheablePropertyValue(UIAHandler.UIA_IsDialogPropertyId) | ||
except COMError: | ||
isDialog = False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of setting this to False, you could consider setting isDialog to the expression in the if clause. like:
To me, this is a bit more readable. Or are there cases where isDialog returns False, and yet we should treat something as a dialog? In that case, the "not isdialog" check still seems redundant. I think we should always respect isDialog if possible. |
||
if isDialog or (not isDialog and (self.UIAIsWindowElement and UIAClassName in UIAHandler.UIADialogClassNames) | ||
or (not self.UIAIsWindowElement and UIAClassName == "Popup")): | ||
clsList.append(Dialog) | ||
# #6241: Try detecting all possible suggestions containers and search fields scattered throughout Windows 10. | ||
# In Windows 10, allow Start menu search box and Edge's address omnibar to participate in announcing appearance of auto-suggestions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instaling > installing