appium-flutter-driver: scroll in java is not working.

as per my flutter driver

await driver.scroll(<SerializableFinder>, 0, 400, Duration(milliseconds: 500));

is working

but the same in appium flutter driver

driver.executeScript("flutter:scroll", find.byValueKey("key"), new HashMap<String, Object>() {{ put("dxScroll", 0); put("dyScroll", -400); }});

is not working. the exception I am getting is

`[debug] [FlutterDriver] Executing Flutter driver command ‘execute’ [debug] [FlutterDriver] >>> {“command”:“waitFor”,“finderType”:“ByValueKey”,“keyValueType”:“String”,“keyValueString”:“post_card_list”} [debug] [FlutterDriver] <<< {“isError”:false,“response”:{},“type”:“_extensionType”,“method”:“ext.flutter.driver”} | previous command waitFor [debug] [MJSONWP (33745d21)] Responding to client with driver.execute() result: {} [HTTP] <-- POST /wd/hub/session/33745d21-e550-493b-a2e1-ccf90c9f25f0/execute 200 10 ms - 74 [HTTP] [HTTP] --> POST /wd/hub/session/33745d21-e550-493b-a2e1-ccf90c9f25f0/execute [HTTP] {“script”:“flutter:scroll”,“args”:[{“ELEMENT”:“eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlVHlwZSI6IlN0cmluZyIsImtleVZhbHVlU3RyaW5nIjoicG9zdF9jYXJkX2xpc3QifQ”,“element-6066-11e4-a52e-4f735466cecf”:“eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlVHlwZSI6IlN0cmluZyIsImtleVZhbHVlU3RyaW5nIjoicG9zdF9jYXJkX2xpc3QifQ”},{“dyScroll”:-400,“dxScroll”:0}]} [debug] [MJSONWP (33745d21)] Calling AppiumDriver.execute() with args: [“flutter:scroll”,[{“ELEMENT”:“eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlVHlwZSI6IlN0cmluZyIsImtleVZhbHVlU3RyaW5nIjoicG9zdF9jYXJkX2xpc3QifQ”,“element-6066-11e4-a52e-4f735466cecf”:“eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlVHlwZSI6IlN0cmluZyIsImtleVZhbHVlU3RyaW5nIjoicG9zdF9jYXJkX2xpc3QifQ”},{“dyScroll”:-400,“dxScroll”:0}],“33745d21-e550-493b-a2e1-ccf90c9f25f0”] [debug] [FlutterDriver] Executing Flutter driver command ‘execute’ [debug] [MJSONWP (33745d21)] Encountered internal error running command: Error: [object Object] is not a valid options [debug] [MJSONWP (33745d21)] at Object.exports.scroll (/usr/local/lib/node_modules/appium-flutter-driver/lib/commands/execute/scroll.ts:26:11) [debug] [MJSONWP (33745d21)] at FlutterDriver.exports.execute (/usr/local/lib/node_modules/appium-flutter-driver/lib/commands/execute.ts:47:14) [debug] [MJSONWP (33745d21)] at commandExecutor (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-base-driver/lib/basedriver/driver.js:328:23) [debug] [MJSONWP (33745d21)] at /usr/local/lib/node_modules/appium-flutter-driver/node_modules/async-lock/lib/index.js:125:12 [debug] [MJSONWP (33745d21)] at AsyncLock._promiseTry (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/async-lock/lib/index.js:249:31) [debug] [MJSONWP (33745d21)] at exec (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/async-lock/lib/index.js:124:9) [debug] [MJSONWP (33745d21)] at AsyncLock.acquire (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/async-lock/lib/index.js:140:3) [debug] [MJSONWP (33745d21)] at FlutterDriver.executeCommand (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-base-driver/lib/basedriver/driver.js:330:39) [debug] [MJSONWP (33745d21)] at FlutterDriver.executeCommand (/usr/local/lib/node_modules/appium-flutter-driver/lib/driver.ts:122:22) [debug] [MJSONWP (33745d21)] at AppiumDriver.executeCommand (/usr/local/lib/node_modules/appium/lib/appium.js:510:36) [debug] [MJSONWP (33745d21)] at process._tickCallback (internal/process/next_tick.js:68:7) [HTTP] <-- POST /wd/hub/session/33745d21-e550-493b-a2e1-ccf90c9f25f0/execute 500 14 ms - 209 [HTTP] [HTTP] --> DELETE /wd/hub/session/33745d21-e550-493b-a2e1-ccf90c9f25f0 [HTTP] {} [debug] [MJSONWP (33745d21)] Calling AppiumDriver.deleteSession() with args: [“33745d21-e550-493b-a2e1-ccf90c9f25f0”] [debug] [BaseDriver] Event ‘quitSessionRequested’ logged at 1580903221233 (17:17:01 GMT+0530 (India Standard Time))

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: [object Object] is not a valid options (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’

` appium : 1.15.0-beta.0 finder: 0.0.4

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15

Most upvoted comments