Skip to content

Commit

Permalink
Ignore elements which are not visible
Browse files Browse the repository at this point in the history
  • Loading branch information
sravanmedarapu committed Feb 17, 2017
1 parent fd89802 commit 5a7adfb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ private List<UiAutomationElement> buildChildren(AccessibilityNodeInfo node) {
children = new ArrayList<UiAutomationElement>(childCount);
for (int i = 0; i < childCount; i++) {
AccessibilityNodeInfo child = node.getChild(i);
if (child != null) {
//Ignore if element is not visible on the screen
if (child != null && child.isVisibleToUser()) {
children.add(this.getElement(child, this, i));
}
}
Expand Down

0 comments on commit 5a7adfb

Please sign in to comment.