From 42ccfd0a8da7fc2a76ee2ea45520ae9d13e8d256 Mon Sep 17 00:00:00 2001 From: Dan Caseley Date: Sun, 3 Nov 2024 17:59:20 +0000 Subject: [PATCH] Fix off-by-one when specifying count with inputText (fixes #2122) --- .../androidTest/java/dev/mobile/maestro/MaestroDriverService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maestro-android/src/androidTest/java/dev/mobile/maestro/MaestroDriverService.kt b/maestro-android/src/androidTest/java/dev/mobile/maestro/MaestroDriverService.kt index 083238f866..666f11899c 100644 --- a/maestro-android/src/androidTest/java/dev/mobile/maestro/MaestroDriverService.kt +++ b/maestro-android/src/androidTest/java/dev/mobile/maestro/MaestroDriverService.kt @@ -273,7 +273,7 @@ class Service( val charactersToErase = request.charactersToErase Log.d("Maestro", "Erasing text $charactersToErase") - for (i in 0..charactersToErase) { + for (i in 1..charactersToErase) { uiDevice.pressDelete() }