Skip to content

Commit 678c933

Browse files
author
subramanya
committed
Fix flutter scroll issue
1 parent b96c868 commit 678c933

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/io/appium/java_client/flutter/commands/ScrollParameter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@Setter
1919
public class ScrollParameter extends FlutterCommandParameter {
2020
private AppiumBy.FlutterBy scrollTo;
21-
private WebElement scrollView;
21+
private AppiumBy.FlutterBy scrollView;
2222
private ScrollDirection scrollDirection;
2323
private Integer delta;
2424
private Integer maxScrolls;
@@ -56,13 +56,13 @@ public Map<String, Object> toJson() {
5656

5757
params.put("finder", parseFlutterLocator(scrollTo));
5858
Optional.ofNullable(scrollView)
59-
.ifPresent(scrollView -> params.put("scrollView", scrollView));
59+
.ifPresent(scrollView -> params.put("scrollView", parseFlutterLocator(scrollView)));
6060
Optional.ofNullable(delta)
6161
.ifPresent(delta -> params.put("delta", delta));
6262
Optional.ofNullable(maxScrolls)
63-
.ifPresent(maxScrolls -> params.put("delta", maxScrolls));
63+
.ifPresent(maxScrolls -> params.put("maxScrolls", maxScrolls));
6464
Optional.ofNullable(settleBetweenScrollsTimeout)
65-
.ifPresent(timeout -> params.put("delta", settleBetweenScrollsTimeout));
65+
.ifPresent(timeout -> params.put("settleBetweenScrollsTimeout", settleBetweenScrollsTimeout));
6666
Optional.ofNullable(scrollDirection)
6767
.ifPresent(direction -> params.put("scrollDirection", direction.getDirection()));
6868
Optional.ofNullable(dragDuration)

0 commit comments

Comments
 (0)