From 2f05614218b292f642eef4a135fddf03366369c5 Mon Sep 17 00:00:00 2001 From: Benoit CIVEL Date: Thu, 28 Nov 2024 23:28:20 +0100 Subject: [PATCH] Fix offset after scroll for IPA and APK --- .../org/cerberus/core/service/appium/impl/AppiumService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/main/java/org/cerberus/core/service/appium/impl/AppiumService.java b/source/src/main/java/org/cerberus/core/service/appium/impl/AppiumService.java index b9908639b..1b44c49c5 100644 --- a/source/src/main/java/org/cerberus/core/service/appium/impl/AppiumService.java +++ b/source/src/main/java/org/cerberus/core/service/appium/impl/AppiumService.java @@ -451,7 +451,7 @@ private boolean scrollDown(AppiumDriver driver, By element, int numberOfScrollDo //Element found, perform another scroll to offset from middle of screen int pressOffsetX = driver.manage().window().getSize().width / 2; int pressOffsetY = driver.manage().window().getSize().height / 2; - scroll(driver, pressOffsetX, pressOffsetY, hOffset, vOffset); + scroll(driver, pressOffsetX, pressOffsetY, pressOffsetX-hOffset, pressOffsetY-vOffset); return true; } else {