|
18 | 18 | @Setter
|
19 | 19 | public class ScrollParameter extends FlutterCommandParameter {
|
20 | 20 | private AppiumBy.FlutterBy scrollTo;
|
21 |
| - private WebElement scrollView; |
| 21 | + private AppiumBy.FlutterBy scrollView; |
22 | 22 | private ScrollDirection scrollDirection;
|
23 | 23 | private Integer delta;
|
24 | 24 | private Integer maxScrolls;
|
@@ -56,13 +56,13 @@ public Map<String, Object> toJson() {
|
56 | 56 |
|
57 | 57 | params.put("finder", parseFlutterLocator(scrollTo));
|
58 | 58 | Optional.ofNullable(scrollView)
|
59 |
| - .ifPresent(scrollView -> params.put("scrollView", scrollView)); |
| 59 | + .ifPresent(scrollView -> params.put("scrollView", parseFlutterLocator(scrollView))); |
60 | 60 | Optional.ofNullable(delta)
|
61 | 61 | .ifPresent(delta -> params.put("delta", delta));
|
62 | 62 | Optional.ofNullable(maxScrolls)
|
63 |
| - .ifPresent(maxScrolls -> params.put("delta", maxScrolls)); |
| 63 | + .ifPresent(maxScrolls -> params.put("maxScrolls", maxScrolls)); |
64 | 64 | Optional.ofNullable(settleBetweenScrollsTimeout)
|
65 |
| - .ifPresent(timeout -> params.put("delta", settleBetweenScrollsTimeout)); |
| 65 | + .ifPresent(timeout -> params.put("settleBetweenScrollsTimeout", settleBetweenScrollsTimeout)); |
66 | 66 | Optional.ofNullable(scrollDirection)
|
67 | 67 | .ifPresent(direction -> params.put("scrollDirection", direction.getDirection()));
|
68 | 68 | Optional.ofNullable(dragDuration)
|
|
0 commit comments