From 1df8c94b51e9a61012b4b264935119dbe527ef4a 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() }