appium-flutter-driver
appium-flutter-driver copied to clipboard
feature request: Inspect flutter apps in Appium Inspector
Current Behavior
Currently, we are unable to inspect our flutter app using Appium Inspector.
Everytime, the Inspector infinitely loads and this is what we are getting from the Appium Server logs.
[debug] [FlutterDriver] Executing Flutter driver command 'getWindowRect'
[debug] [FlutterDriver@c001 (2464f28f)] Encountered internal error running command: NotYetImplementedError: Method has not yet been implemented
Suggested Solution
It would be really helpful if we able to inspect Flutter apps and see the keys.
Additional Information
No response
Sounds like the flutter driver needs to implement some new commands for the inspector to support it. This should probably be a feature request for the flutter driver instead for now.
Yes, this is not for this inspector's feature request.
The difficulty of this issue is flutter_driver by Flutter team only returns string text as current getRenderTree method to get the tree. It is not usable for XPath even if we can parse it to XML style for example as some design's differences.
btw, https://github.com/appium/appium-flutter-driver/issues/56 is an old proposal to use https://docs.flutter.dev/tools/devtools/inspector#details-tree
I'm not sure if we could achieve this as the same level for other drivers like UIA2/XCUITest we provide, while we're welcome PRs
Let me move this ticket to the flutter driver repo with help wanted
I'm using Appium Inspector with Flutter app on MacOS and it's working fine for me. If I just connected to the Appium session Inspector will load the mobile app screen infinitely. But if to switch in Appium Inspector several times with 1-3 seconds delay between "Native App Mode" and "Web/Hybrid App Mode" Flutter app screen become visible and I can find some XPaths to use it with "NATIVE_APP" context later.
But if I need Flutter properties instead of Native, I'm using Flutter Inspector in Android Studio
First day playing around with flutter and using appium inspector to to review the android build. This loading forever issue started happening after a few successful runs against emulators and a device. I just tried @denysord88 solution and can report it worked for me as well fwiw. I'm feeling ambivalent about this but happy it got me unstuck :).