def event_liveRegionChange(self, obj, nextHandler):
if isinstance(obj, UIA):
# Accessibility message alerts.
# For some messages, system alert event is raised along with this event, so return.
if obj.role == controlTypes.ROLE_ALERT and obj.UIAElement.cachedAutomationID == "a11y-announcements-message":
return
nextHandler()
# For message alerts, system alert and live region changed are fired at the same time.
评论列表
文章目录