‘Below are the suggestion of working with automating flutter mobile app. Hope it coveres most of the queries
Flutter automation is a bit different compared to native Android/iOS apps, and since you’re already working in automation (Katalon, Selenium, etc.), I’ll give you a practical, implementation-focused answer.
Recommended Approach to Automate Flutter Apps Using Katalon
Katalon Studio uses Appium underneath for mobile automation.
Flutter apps do NOT expose native UI elements directly like standard Android (View-based) or iOS (UIKit) apps.
So below can be the best approach
Recommended Strategy for Automating Flutter Apps with Katalon
First: Understand the Core Reality
Flutter apps:
-
Render UI via Skia (not native Android Views / iOS UIKit)
-
Appear as a single native container to UiAutomator2 / XCUITest
-
Require instrumentation for stable automation
So your success depends on:
How much control you have over the Flutter codebase.
The Best Overall Strategy
Use Dual Driver Strategy (Most Practical Enterprise Approach)
| Purpose |
Driver |
| Flutter widget interaction |
Appium Flutter Driver |
| Native dialogs / OS popups |
UiAutomator2 / XCUITest |
When to Use What?
Use appium-flutter-driver when:
-
You need stable widget-level interaction
-
Flutter widgets are not visible in native hierarchy
-
XPath is unreliable
-
UI changes frequently
-
You want direct widget tree access
This is the MOST powerful approach for pure Flutter apps.
Use UiAutomator2 / XCUITest when:
Now Let’s Address Each of Your Questions Clearly
What Is the Recommended Approach?
BEST:
Use appium-flutter-driver + Katalon custom keywords
Because:
-
You can directly access Flutter widget tree
-
No dependency on native accessibility hierarchy
-
More stable for Flutter-heavy apps
BUT…
Katalon does NOT natively support Flutter driver commands.
So you must:
-
Install flutter driver in Appium
-
Create custom Groovy keywords
-
Use driver.executeScript("flutter:...")
If your team is mature → go this route.
If not → fallback to accessibility approach.
Is It Better to Rely on UiAutomator2 & XCUITest?
Answer: ONLY if app is properly instrumented.
If developers expose:
Then yes — UiAutomator2/XCUITest works fine.
If not → they will see:
android.view.View
XCUIElementTypeOther
And your automation becomes fragile.
Are There Limitations with Flutter Widgets?
Yes.
Without Flutter driver:
With Flutter driver:
-
Can access:
-
ByValueKey
-
ByText
-
ByType
-
Descendant matchers
-
Much more stable
So Flutter driver removes most widget limitations.
Key Prerequisites for Stable Automation
This is where BOTH suggestions align strongly.
MUST HAVE:
Unique Identifiers in Code
Example:
ElevatedButton(
key: ValueKey('btn_login'),
)
OR
Semantics(
label: 'btn_login',
child: ElevatedButton(...)
)
Stable Naming Convention
Never use:
LoginButton1
LoginButtonFinal
LoginButtonNew
Use:
btn_login
txt_username
lbl_error_invalid_login
Testable Build Variant
Developers must:
Explicit Waits
Flutter has animations & async rendering.
In Katalon:
Mobile.waitForElementPresent()
Avoid:
delay(5)
Should We Expose resource-id and accessibilityIdentifier?
YES. Absolutely.
Even if using Flutter driver.
Because:
In Flutter, this is done using:
-
Semantics
-
ValueKey
-
Custom testId mapping
This is non-negotiable for stable automation.
Is Using Semantics with Unique Identifiers Recommended?
YES — It is the industry best practice.
Semantics is the bridge between:
Flutter Widget Tree

Native Accessibility Tree

Appium

Katalon
Without semantics → automation pain.
Specific Flutter Configurations Needed?
Yes:
Developers should:
-
Add Semantics to important widgets
-
Add ValueKey to interactive components
-
Ensure semantics are NOT excluded
-
Avoid excludeSemantics: true
-
Avoid custom RenderObjects without semantics
-
Preserve semantics in test build
Now The Most Important Decision for YOU
Since you:
I Recommend This Practical Architecture:
OPTION A (Advanced / Best Control)
Flutter App
↓
ValueKey + Semantics
↓
Appium Flutter Driver
↓
Custom Katalon Keywords
↓
CI/CD
Best for:
OPTION B (Simpler / Lower Setup Overhead)
Flutter App
↓
Semantics + accessibilityIdentifier
↓
UiAutomator2 / XCUITest
↓
Katalon Mobile Keywords
Best for:
-
Teams new to Flutter
-
Minimal framework change
-
Faster implementation
Final Verdict
| Question |
Final Answer |
| Recommended approach? |
Dual strategy (Flutter driver + Native driver) |
| Should we rely only on UiAutomator2? |
No, unless app is well instrumented |
| Are Flutter widgets limited? |
Yes without Flutter driver |
| Must expose IDs? |
Absolutely |
| Use Semantics? |
Strongly recommended |
| Flutter config needed? |
Yes – preserve semantics & keys |
| Most stable solution? |
Flutter driver + unique ValueKey |
My Honest Professional Advice
If you are starting fresh:
→ Implement ValueKey everywhere
→ Use Semantics labels
→ Install appium-flutter-driver
→ Create reusable Katalon custom keywords
That gives you long-term stability.
If this is an already built app and devs resist changes:
→ Use accessibility + UiAutomator2
→ Accept some limitations