From 9c4aa98e0fe13a30cae8dab1775506f663770759 Mon Sep 17 00:00:00 2001 From: guulp <110553417+guulp@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:07:23 -0700 Subject: [PATCH] Fix finder more see https://github.com/appium/appium-flutter-driver/pull/591 & https://github.com/appium/appium-flutter-driver/pull/590/ and comment https://github.com/appium/appium-flutter-driver/issues/586#issuecomment-1762709937 --- .../java/io/github/ashwith/flutter/FlutterFinder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/github/ashwith/flutter/FlutterFinder.java b/src/main/java/io/github/ashwith/flutter/FlutterFinder.java index e3b66fa..5bf4d54 100644 --- a/src/main/java/io/github/ashwith/flutter/FlutterFinder.java +++ b/src/main/java/io/github/ashwith/flutter/FlutterFinder.java @@ -85,8 +85,8 @@ public FlutterElement byText(String input) { public FlutterElement byAncestor(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly) { Map matchIdentifier = new HashMap<>(ImmutableMap.of( FINDER_TYPE, "Ancestor", - "matchRoot", matchRoot, - "firstMatchOnly", firstMatchOnly + "matchRoot", Boolean.toString(matchRoot), + "firstMatchOnly", Boolean.toString(firstMatchOnly) )); matchIdentifier.put("of", of.getRawMap()); matchIdentifier.put("matching", matching.getRawMap()); @@ -100,8 +100,8 @@ public FlutterElement byAncestor(FlutterElement of, FlutterElement matching, boo public FlutterElement byDescendant(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly) { Map matchIdentifier = new HashMap<>(ImmutableMap.of( FINDER_TYPE, "Descendant", - "matchRoot", matchRoot, - "firstMatchOnly", firstMatchOnly + "matchRoot", Boolean.toString(matchRoot), + "firstMatchOnly", Boolean.toString(firstMatchOnly) )); matchIdentifier.put("of", of.getRawMap()); matchIdentifier.put("matching", matching.getRawMap()); @@ -139,4 +139,4 @@ public FlutterElement bySemanticsLabel(Pattern label) { public FlutterElement pageBack() { return new FlutterElement(ImmutableMap.of(FINDER_TYPE, "PageBack")); } -} \ No newline at end of file +}