Testing Flutter applications¶
- Browsers
- HbbTV
- NextGen TV / ATSC 3.0
- LG webOS
- PlayStation 4/5
- Samsung Tizen
- Sky
- VIDAA
- Vizio
- Xbox (One, Series X/S) - HTML-based apps
- Xfinity / Xumo TV / XClass TV
- Xumo (Entertainment OS)
- Other Smart TVs and STBs
Android Native Flutter apps
- Android TV - Instrumentation library
- Fire TV - Instrumentation library
- Whale TV - Instrumentation library
- Android mobile - Instrumentation library
For testing Android native Flutter applications see this page. If you want to test Android WebView Flutter app, see more information below.
Flutter is an open source framework for building cross-platform applications (including Android Native).
Setup¶
In order to test Flutter application, you will need to have the element structure exposed (otherwise you will not be able to assert on elements).
Add the following code into lib/main.dart file:
void main() {
// Enable semantics for accessibility and automation testing
WidgetsFlutterBinding.ensureInitialized();
SemanticsBinding.instance.ensureSemantics();
runApp(const MyApp());
}
You may also need to import the following library:
import 'package:flutter/rendering.dart';