[orca] Add debugging
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add debugging
- Date: Thu, 22 Aug 2019 13:53:54 +0000 (UTC)
commit 2f918f1f741c907300bff6d0d112e80c8252d129
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Aug 22 09:53:45 2019 -0400
Add debugging
src/orca/scripts/web/script_utilities.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 2610f942d..5d9828bd4 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -981,26 +981,44 @@ class Utilities(script_utilities.Utilities):
try:
rv = obj.queryText()
characterCount = rv.characterCount
+ except NotImplementedError:
+ msg = "WEB: %s doesn't implement text interface" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ rv = None
except:
+ msg = "WEB: Exception getting character count for %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
else:
if not characterCount:
+ msg = "WEB: %s reports 0 characters" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
if self.isCellWithNameFromHeader(obj):
pass
elif self._treatObjectAsWhole(obj) and obj.name:
+ msg = "WEB: Treating %s as non-text: named object treated as whole." % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
elif not self.isLiveRegion(obj):
doNotQuery = [pyatspi.ROLE_TABLE_ROW, pyatspi.ROLE_LIST_BOX]
role = obj.getRole()
if rv and role in doNotQuery:
+ msg = "WEB: Treating %s as non-text due to role." % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
if rv and excludeNonEntryTextWidgets and self.isNonEntryTextWidget(obj):
+ msg = "WEB: Treating %s as non-text: is non-entry text widget." % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
if rv and (self.isHidden(obj) or self.isOffScreenLabel(obj)):
+ msg = "WEB: Treating %s as non-text: is hidden or off-screen label." % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
if rv and self.isNonNavigableEmbeddedDocument(obj):
+ msg = "WEB: Treating %s as non-text: is non-navigable embedded document." % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
rv = None
self._text[hash(obj)] = rv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]