Skip to content

Commit

Permalink
Merge pull request #90 from caofengbin/feature/fix_find_elements
Browse files Browse the repository at this point in the history
fix:优化双端的findElementList逻辑,仅在查找到元素的时候退出while循环
  • Loading branch information
ZhouYixun authored Jun 22, 2023
2 parents db52ad7 + 416de5e commit 713f493
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,11 @@ public List<AndroidElement> findElementList(String selector, String value, Integ
androidElementList.add(new AndroidElementImpl(id, this));
} else {
logger.error("parse element id %s failed.", ele);
continue;
}
}
break;
if (androidElementList.size() > 0) {
break;
}
} else {
logger.error("elements not found. retried %d times, retry in %d ms.", wait, intervalInit);
errMsg = b.getErr().getMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,11 @@ public List<IOSElement> findElementList(String selector, String value, Integer r
iosElementList.add(new IOSElementImpl(id, this));
} else {
logger.error("parse element id %s failed.", ele);
continue;
}
}
break;
if (iosElementList.size() > 0) {
break;
}
} else {
logger.error("elements not found. retried %d times, retry in %d ms.", wait, intervalInit);
errMsg = b.getErr().getMessage();
Expand Down

0 comments on commit 713f493

Please sign in to comment.