Skip to content

Commit

Permalink
Fix flutter scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
subramanya committed Aug 28, 2024
1 parent b96c868 commit 678c933
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@Setter
public class ScrollParameter extends FlutterCommandParameter {
private AppiumBy.FlutterBy scrollTo;
private WebElement scrollView;
private AppiumBy.FlutterBy scrollView;
private ScrollDirection scrollDirection;
private Integer delta;
private Integer maxScrolls;
Expand Down Expand Up @@ -56,13 +56,13 @@ public Map<String, Object> toJson() {

params.put("finder", parseFlutterLocator(scrollTo));
Optional.ofNullable(scrollView)
.ifPresent(scrollView -> params.put("scrollView", scrollView));
.ifPresent(scrollView -> params.put("scrollView", parseFlutterLocator(scrollView)));
Optional.ofNullable(delta)
.ifPresent(delta -> params.put("delta", delta));
Optional.ofNullable(maxScrolls)
.ifPresent(maxScrolls -> params.put("delta", maxScrolls));
.ifPresent(maxScrolls -> params.put("maxScrolls", maxScrolls));
Optional.ofNullable(settleBetweenScrollsTimeout)
.ifPresent(timeout -> params.put("delta", settleBetweenScrollsTimeout));
.ifPresent(timeout -> params.put("settleBetweenScrollsTimeout", settleBetweenScrollsTimeout));
Optional.ofNullable(scrollDirection)
.ifPresent(direction -> params.put("scrollDirection", direction.getDirection()));
Optional.ofNullable(dragDuration)
Expand Down

0 comments on commit 678c933

Please sign in to comment.