Tim*_*and 12 android-uiautomator
我的理解是UIAutomator无法在uiautomatorviewer中自动化任何NAF = true的元素.我搜索了高低,但我不能为我的生活找到NAF代表的东西.有人知道吗?
bla*_*lah 12
" 无法访问友好 "
这些UI元素显然是交互式的,但没有像内容描述那样的可访问性.
从AccessibilityNodeInfoDumper.java的源代码(uiautomator的一部分):
Run Code Online (Sandbox Code Playgroud)/** * We're looking for UI controls that are enabled, clickable but have no * text nor content-description. Such controls configuration indicate an * interactive control is present in the UI and is most likely not * accessibility friendly. We refer to such controls here as NAF controls * (Not Accessibility Friendly) * * @param node * @return false if a node fails the check, true if all is OK */ private static boolean nafCheck(AccessibilityNodeInfo node) { boolean isNaf = node.isClickable() && node.isEnabled() && safeCharSeqToString(node.getContentDescription()).isEmpty() && safeCharSeqToString(node.getText()).isEmpty(); if (!isNaf) return true; // check children since sometimes the containing element is clickable // and NAF but a child's text or description is available. Will assume // such layout as fine. return childNafCheck(node); }
| 归档时间: |
|
| 查看次数: |
7700 次 |
| 最近记录: |