Skip to content

Commit a4ca5be

Browse files
committed
Calculate WdElement visibleAt logic with scrollTop
1 parent 0a920fc commit a4ca5be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webdriver/src/org/testar/monkey/alayer/webdriver/WdElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ protected void fillScrollValues() {
398398

399399
public boolean visibleAt(double x, double y) {
400400
int scrollLeft = (root == null) ? 0 : (int) root.scrollLeft;
401-
int scrollHeight = (root == null) ? 0 : (int) root.scrollHeight;
402-
return rect != null && rect.contains(x - scrollLeft, y - scrollHeight);
401+
int scrollTop = (root == null) ? 0 : (int) root.scrollTop;
402+
return rect != null && rect.contains(x - scrollLeft, y - scrollTop);
403403
}
404404

405405
public boolean visibleAt(double x, double y, boolean obscuredByChildFeature) {

0 commit comments

Comments
 (0)