question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flutter Driver scroll Until Error

See original GitHub issue

When using appium flutter driver with web driver io and scroll until element is visible we are getting the below error.

unknown error: An unknown server-side error occurred while processing the command. Original error: Cannot execute command scroll, server reponse { "isError": true, "response": "Uncaught extension error while executing scroll: IntegerDivisionByZeroException\n#0 Duration.~/ (dart:core/duration.dart:219:24)\n#1 CommandHandlerFactory._scroll (package:flutter_driver/src/common/handler_factory.dart:369:51)\n<asynchronous suspension>\n#2 FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:372:31)\n<asynchronous suspension>\n#3 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:851:18)\n<asynchronous suspension>\n", "type": "_extensionType", "method": "ext.flutter.driver" }

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KazuCocoacommented, Sep 9, 2022

I see. I read the flutter’s code.

The scroll’s duration was “microseconds”, so it should not have removed the *1000, but others should. https://github.com/flutter/flutter/blob/master/packages/flutter_driver/lib/src/common/gesture.dart#L33-L38

0reactions
KazuCocoacommented, Sep 10, 2022

v1.7.1 has the fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scrolling and Tap not working in flutter driver #16991 - GitHub
Steps to Reproduce I have been using driver.scroll(...) and driver.tap(...) elsewhere, but have been unable to automate this particular game ...
Read more >
Handle scrolling - Testing - Flutter documentation
The WidgetTester class provides the scrollUntilVisible() method, which scrolls through a list until a specific widget is visible. This is useful because the ......
Read more >
flutter - Scrolling not working with SingleChildScrollView
I want to do scrolling using flutter driver on a page that uses SingleChildScrollView.. the layout looks like this
Read more >
appium-flutter-driver - npm
Appium Flutter Driver is a test automation tool for Flutter apps on multiple platforms/OSes. Appium Flutter Driver is part of the Appium mobile ......
Read more >
Integration Testing in Flutter - Medium
This article shows how to perform integration testing in flutter. ... In order to scroll down, we need to specify y-offset as negative...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found