How to automate flutter mobile app using appium?
-
You can use gherkin packages available on pub.dev to automate using BDD Cucumber. The tests will be written in dart.
-
As far as my finding, appium requires
accessibility-id
to interact with elements. In flutter you cannot setaccessibility-id
for widgets. I gave up after a few days of research. The issue is still open.
Edit: Found this as well that says semanticLabel can be used for resource-id.
- Flutter has its own integration test package that you can use to automate your tests. It's very easy to implement. Read more here: https://docs.flutter.dev/cookbook/testing/integration/introduction
Vaibhav Khachane
Energetic Software Testing professional. Professional experience in Manual and Automation Testing . Top Priority for Customer Satisfaction.
Updated on January 03, 2023Comments
-
Vaibhav Khachane over 1 year
Currently, I am working on automating flutter mobile apps. I have successfully designed a BDD cucumber Java framework with a login script that is working well. Then I tried automating other functionalities, but I couldn’t get the mobile elements locator values into Appium Inspector. Our Team I need your input on the following points.
- Is it possible to automate flutter applications with the BDD Cucumber Java framework?
- Is it possible to inspect all mobile elements of the flutter app using the appium inspector? Do any other way to inspect flutter app elements ?
- Do we have any other options for automating Flutter apps?
-
Vaibhav Khachane over 2 yearsThanks for the quick response. As per my understanding, Currently we can't automate flutter apps using appium locators ? And there is only one option to automate flutter app is DART
-
aki over 2 yearsWhen I tried it, yes. There was no way to locate elements. But according to that article, you can use semanticLabels. Why not give that a try?
-
aki over 2 yearsOther than that, the integration test package is the recommended way and it is pretty easy to use.