New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter support for Appium #12919
Comments
Hi @truongsinh. That is a really nice idea but I don't think we have that many resources at the moment. Have you contacted the Flutter team to integrate their driver with the Appium project? There are already some drivers which are developed externally from the Appium team but integrated into the Appium project |
@umutuzgur I created flutter/flutter#36259 . Meanwhile, can you show me to some documentation to get started with developing 3rd party Appium driver, and also some examples? |
related threads: google/EarlGrey#778, flutter/flutter#32987 |
related threads: flutter/flutter#25465 |
@truongsinh I will ask around where the documentation is for the custom drivers but in the mean time, these are some of the custom drivers appium-youiengine-driver, appium-tizen-driver |
Linking flutter/flutter#17988 |
linking flutter/flutter#32062 (comment) |
@umutuzgur one more question, does the driver have to be in JS, or it can be in other languages? |
@truongsinh It should be JS. I don't know if you can transpile Dart to JS but that would also work I think |
@umutuzgur https://www.npmjs.com/package/appium-flutter-driver first prototype, working with both iOS and Android with limited commands (get text and tap only). But we need to declare this package in appium source code. |
Awesome, @truongsinh It's out of my curiosity. Because flutter_driver has knowledge for flutter like https://github.com/flutter/flutter/blob/b712a172f9694745f50505c93340883493b505e5/packages/flutter_driver/lib/src/driver/driver.dart#L770-L821 and I considered which way was better for them. |
@KazuCocoa at the moment both approaches are highly experimental thus I don't have a strong idea 😁. Though do you think the http server approach can do context-aware commands (some commands sent to native view, some to web view, some to Flutter view), and on iOS real devices (I understand that http server approach install another http server app on device under test, and it's always painful to install anything on iOS real devices). On the other hand, Dart VM Service Protocol with extension ext.flutter.driver is undocumented protocol, thus direct communication to Dart VM might have broken changes in the future if the Flutter team refactor their code. |
Thanks :)
yeah... |
We can probably catch up with communication protocol with Dart VM between flutter_driver <=> dart vm by their tests => https://github.com/flutter/flutter/tree/180aa0c0b1fc645aa661a9aeedc21ed91c93ad00/packages/flutter_driver/test here also (for example) We should call screenshot via ios/android drivers since flutter 's take screenshot is calling commands outside dart vm. e.g. https://github.com/flutter/flutter/search?p=4&q=screenshot&unscoped_q=screenshot |
Thanks, this really helps, so far I have been doing reverse engineering with |
As discussed in appium#12919 (comment), we need to declare package name and class name for Flutter Driver. In the long run however, I believe this part of code should be refactored so that arbitrary driver can run without code change from `appium` core. Security risk should be minimal because that package must be installed beforehand anyway.
@KazuCocoa @mykola-mokhnach could you take a look at #12945? |
Btw, is there any known limitation for https://github.com/truongsinh/appium-flutter-driver ? e.g. it can run only debug mode, only on simulator etc... |
Currently the API is very limited, as documented in https://github.com/truongsinh/appium-flutter-driver#finders and at https://github.com/truongsinh/appium-flutter-driver#finders . I have been able to run the examples on Android emulator, Android real device (Pixel 2), iOS emulator. I haven't run on iOS real device yet. As for mode, do you mean flutter mode or Android/iOS mode? Does it make sense to run test on non-debug mode :-? Anyway, as long as there's |
@truongsinh this is a great idea. If you get me your e-mail somehow I will invite you to the appium developer slack chat, for this kind of thing sometimes real time communication is easier. DM @jlipps on twitter might be a good channel. |
DM'ed |
@KazuCocoa I published v0.0.5 with screenshot functionality. Actually we can have screenshot both from Dart VM and via jwproxy, depends on the needs. Screenshot from Dart VM is pure app, while screenshot via jwproxy may have extraneous element like top and bottom bar, as seen from these screenshots |
Thanks 👍 #12919 (comment) Ah, okay. -- btw, I was able to do on iOS real devices (I understand that http server approach install another http server app on device under test, and it's always painful to install anything on iOS real devices). |
@truongsinh Should we close this issue since now we can communicate over slack? |
it's true we are communicating over slack, but if we keep this issue open until (1) Flutter is actually supported in Appium, or (2) we make a decision that Appium would not support Flutter, we can easily see the status. I don't have a strong opinion, how about others? |
* Support Flutter driver As discussed in #12919 (comment), we need to declare package name and class name for Flutter Driver. In the long run however, I believe this part of code should be refactored so that arbitrary driver can run without code change from `appium` core. Security risk should be minimal because that package must be installed beforehand anyway. * `prepare` supersedes `prepublish` This will also helps with install directly via git, e.g. `npm i -g git://github.com/appium/appium` * add flutter driver in deps
@truongsinh Many Thanks, |
seems lots of us are waiting for appium-flutter-driver, could you please add flutter support in Appium as soon as possible, we are expecting to use it in Appium. Thanks!!! |
@KazuCocoa How can we Run on IOS Real device using Appium-Flutter-Driver . Do we need to make any specific changes in Desired capability ? |
Closed as fixed |
I found out this field in flutter semanticLabel When I add this attribute to element. I can interact with that element by: MobileBy.AccessibilityId("payment") |
Hi, I have another question, I have multiple navigation bar tab can't add key, so how can I find correct tab I want to interact with them |
Update
Prototype available at https://www.npmjs.com/package/appium-flutter-driver but we need support from appium declaration first.
The problem
Flutter goes with
flutter drive
, the e2e test tool, but it does not work with app that has both flutter view and native view (such as embedding Flutter to existing app), or flutter view with web view (open a webview in Flutter).Having appium flutter driver would solve both problems above, similar to http://appium.io/docs/en/writing-running-appium/web/hybrid/
Related issues:
flutter driver
when used with apps that include native UI flutter/flutter#36259The text was updated successfully, but these errors were encountered: