robotframework-appiumflutterlibrary icon indicating copy to clipboard operation
robotframework-appiumflutterlibrary copied to clipboard

scroll to element issue

Open wsfcsk opened this issue 2 years ago • 0 comments

HI Team The scroll element function does not support the listView ,because it's used the flutter driver function:scrollIntoView , but it's not used when the element is listView , I tried to use scrollUntilVisible instead in your python lib :

code:

def scroll_listView(self,ele_locator): application = self._current_application() list_view = self._element_finder.find(application,"type=ListView") element = self._element_finder.find(application, ele_locator) print(list_view) print(element) application.execute_script('flutter:scrollUntilVisible',list_view, {"item":element, "dxScroll": 90, "dyScroll": -400})

but it's not working as error below:

error details :

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: input is invalid {"element-6066-11e4-a52e-4f735466cecf":"eyJmaW5kZXJUeXBlIjoiQnlUeXBlIiwidHlwZSI6Ikxpc3RWaWV3In0="} Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: input is invalid {"element-6066-11e4-a52e-4f735466cecf":"eyJmaW5kZXJUeXBlIjoiQnlUeXBlIiwidHlwZSI6Ikxpc3RWaWV3In0="} at getResponseForW3CError (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1067:9) at asyncHandler (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:476:57) at runNextTicks (node:internal/process/task_queues:60:5) at processImmediate (node:internal/timers:442:9)

could you help this ??

wsfcsk avatar Feb 17 '23 02:02 wsfcsk