2

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?

2 Answers 2

2
  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
Sign up to request clarification or add additional context in comments.

3 Comments

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
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?
Other than that, the integration test package is the recommended way and it is pretty easy to use.
0
  1. Is it possible to automate flutter applications with the BDD Cucumber Java framework?

yes you can create the project Java + maven + cucumber + Junit or TestNg

  1. 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 ?

There are some limitations to find the elements by using the appium inspector.

1 Comment

yes you can use native context to inspect elements with appium inspector. the second way to inspect elements(Widgets) use flutter inspector but you need to have access to source code and build app from android studio docs.flutter.dev/tools/devtools/inspector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.