diff --git a/finder/dotnet/AppiumFlutterFinder/FlutterBy.cs b/finder/dotnet/AppiumFlutterFinder/FlutterBy.cs index 81f4bc58..4d913dc6 100644 --- a/finder/dotnet/AppiumFlutterFinder/FlutterBy.cs +++ b/finder/dotnet/AppiumFlutterFinder/FlutterBy.cs @@ -71,8 +71,8 @@ public static FlutterBy ByAnscestor(FlutterBy of, => new FlutterBy(new { finderType = "Ancestor", - matchRoot, - firstMatchOnly, + matchRoot = matchRoot.ToString().ToLower(), + firstMatchOnly = firstMatchOnly.ToString().ToLower(), of = of.JsonSearchCriteria, matching = matching.JsonSearchCriteria, }); @@ -84,8 +84,8 @@ public static FlutterBy ByDescendant(FlutterBy of, => new FlutterBy(new { finderType = "Descendant", - matchRoot, - firstMatchOnly, + matchRoot = matchRoot.ToString().ToLower(), + firstMatchOnly = firstMatchOnly.ToString().ToLower(), of = of.JsonSearchCriteria, matching = matching.JsonSearchCriteria, }); @@ -93,4 +93,3 @@ public static FlutterBy ByDescendant(FlutterBy of, } } - diff --git a/finder/dotnet/AppiumFlutterFinderTests/FlutterFinderTests.cs b/finder/dotnet/AppiumFlutterFinderTests/FlutterFinderTests.cs index 73d6f8d8..ec6e1ae2 100644 --- a/finder/dotnet/AppiumFlutterFinderTests/FlutterFinderTests.cs +++ b/finder/dotnet/AppiumFlutterFinderTests/FlutterFinderTests.cs @@ -16,7 +16,7 @@ public void TestByAncestor() FlutterBy.PageBack()), firstMatchOnly: true )); - Assert.AreEqual("eyJmaW5kZXJUeXBlIjoiQW5jZXN0b3IiLCJtYXRjaFJvb3QiOmZhbHNlLCJmaXJzdE1hdGNoT25seSI6dHJ1ZSwib2YiOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6ZmFsc2UsXCJmaXJzdE1hdGNoT25seVwiOmZhbHNlLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9IiwibWF0Y2hpbmciOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6ZmFsc2UsXCJmaXJzdE1hdGNoT25seVwiOmZhbHNlLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9In0=", element.Id); + Assert.AreEqual("eyJmaW5kZXJUeXBlIjoiQW5jZXN0b3IiLCJtYXRjaFJvb3QiOiJmYWxzZSIsImZpcnN0TWF0Y2hPbmx5IjoidHJ1ZSIsIm9mIjoie1wiZmluZGVyVHlwZVwiOlwiQW5jZXN0b3JcIixcIm1hdGNoUm9vdFwiOlwiZmFsc2VcIixcImZpcnN0TWF0Y2hPbmx5XCI6XCJmYWxzZVwiLFwib2ZcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIixcIm1hdGNoaW5nXCI6XCJ7XFxcImZpbmRlclR5cGVcXFwiOlxcXCJQYWdlQmFja1xcXCJ9XCJ9IiwibWF0Y2hpbmciOiJ7XCJmaW5kZXJUeXBlXCI6XCJBbmNlc3RvclwiLFwibWF0Y2hSb290XCI6XCJmYWxzZVwiLFwiZmlyc3RNYXRjaE9ubHlcIjpcImZhbHNlXCIsXCJvZlwiOlwie1xcXCJmaW5kZXJUeXBlXFxcIjpcXFwiUGFnZUJhY2tcXFwifVwiLFwibWF0Y2hpbmdcIjpcIntcXFwiZmluZGVyVHlwZVxcXCI6XFxcIlBhZ2VCYWNrXFxcIn1cIn0ifQ==", element.Id); } [Test] @@ -28,7 +28,7 @@ public void TestBydescendant() FlutterBy.ByDescendant(FlutterBy.PageBack(), FlutterBy.PageBack()) )); - Assert.A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