How to automate flutter mobile app using appium?

419
  1. You can use gherkin packages available on pub.dev to automate using BDD Cucumber. The tests will be written in dart.

  2. As far as my finding, appium requires accessibility-id to interact with elements. In flutter you cannot set accessibility-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.

  1. 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
Share:
419
Vaibhav Khachane
Author by

Vaibhav Khachane

Energetic Software Testing professional. Professional experience in Manual and Automation Testing . Top Priority for Customer Satisfaction.

Updated on January 03, 2023

Comments

  • Vaibhav Khachane
    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.

    1. Is it possible to automate flutter applications with the BDD Cucumber Java framework?
    2. 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 ?
    3. Do we have any other options for automating Flutter apps?
  • Vaibhav Khachane
    Vaibhav Khachane over 2 years
    Thanks 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
    aki over 2 years
    When 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
    aki over 2 years
    Other than that, the integration test package is the recommended way and it is pretty easy to use.