@@ -25,7 +25,7 @@ The current Appium Flutter Driver is built on top of the `flutter_test` SDK, whi
2525
2626This driver is built using [ Flutter Integration Test] ( https://docs.flutter.dev/cookbook/testing/integration/introduction ) .
2727
28- :star : ** Strong Typing & Fluent APIs: ** Ensures robust and easy-to-use interfaces.
28+ :star : ** Strong Typing & Fluent APIs** : Ensures robust and easy-to-use interfaces.
2929
3030:star : ** Element Handling** : Automatically waits for elements to attach to the DOM before interacting.
3131
@@ -35,7 +35,7 @@ This driver is built using [Flutter Integration Test](https://docs.flutter.dev/c
3535
3636:star : ** Simplified Powerful Gestures** : Supports powerful yet simplified gestures like LongPress, ScrollToElement, DragAndDrop, and DoubleClick.
3737
38- :star : * * Element Chaining** : Allows chaining of elements, enabling you to find child elements under a specific parent easily.
38+ :star : * * Element Chaining** : Allows chaining of elements, enabling you to find child elements under a specific parent easily.
3939
4040## How to Use Appium Flutter Integration Driver
4141
@@ -60,7 +60,9 @@ This driver is built using [Flutter Integration Test](https://docs.flutter.dev/c
6060 initializeTest(app: const MyApp());
6161 }
6262 ` ` `
63+
6364 If you are in need to configure certain prerequists before the testing app is loaded, you can try the following code :
65+
6466 ` ` ` dart
6567 import 'package:appium_testing_app/main.dart'; as app;
6668 void main() {
@@ -91,11 +93,11 @@ Bingo! You are ready to run your tests using Appium Flutter Integration Driver.
9193Check if your Flutter app is running on the device or emulator.
9294
9395For Android
94- ` ` `
96+
95971. Run adb command ` adb logcat | grep flutter` to check if the Flutter app is running.
96982. Open the application in the device or emulator manually.
97993. Verify the logs in the console.
98- ```
100+
99101```
10010206-17 17:02:13.246 32697 32743 I flutter : The Dart VM service is listening on http://127.0.0.1:33339/E2REX61NaiI=/
10110306-17 17:02:13.584 32697 32735 I flutter : 00:00 +0: appium flutter server
@@ -108,18 +110,20 @@ For Android
108110For iOS
109111Simulator:
110112
111- ``` xcrun simctl spawn booted log stream | grep flutter `` `
113+ `xcrun simctl spawn booted log stream | grep flutter`
112114
113115Real Device: Check xcode device logs.
114116
1151172. Open the application in the device or emulator manually.
118+
116119```
11712006-17 17:02:13.246 32697 32743 I flutter : The Dart VM service is listening on http://127.0.0.1:33339/E2REX61NaiI=/
11812106-17 17:02:13.584 32697 32735 I flutter : 00:00 +0: appium flutter server
11912206-17 17:02:14.814 32697 32735 I flutter : shelfRun HTTP service running on port 9000
12012306-17 17:02:14.814 32697 32735 I flutter : [ APPIUM FLUTTER] Appium flutter server is listening on port 9000
12112406-17 17:02:14.866 32697 32735 I flutter : [ APPIUM FLUTTER] New Request [ GET] http://127.0.0.1:10000/status
12212506-17
126+ ```
123127
124128## Install the Flutter Integration Driver
125129
@@ -140,30 +144,30 @@ For more details, refer to the documentation for each driver:
140144
141145## Capabilities for Appium Flutter Integration Driver
142146
143- | Capability | Description | Required |
144- | ---------------------------------- | -------------------------------------------------------------------------| ----------|
145- | appium: flutterServerLaunchTimeout | Time in ms to wait for flutter server to be pingable. Default is 5000ms | No |
146- | appium: flutterSystemPort | The number of the port on the host machine used for the Flutter server. By default the first free port from 10000..11000 range is selected. It is recommended to set this value if you are running parallel tests on the same machine.| No |
147-
147+ | Capability | Description | Required |
148+ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
149+ | appium: flutterServerLaunchTimeout | Time in ms to wait for flutter server to be pingable. Default is 5000ms | No |
150+ | appium: flutterSystemPort | The number of the port on the host machine used for the Flutter server. By default the first free port from 10000..11000 range is selected. It is recommended to set this value if you are running parallel tests on the same machine. | No |
151+ | appium : address | Address to connect with flutter server | No |
148152
149153## Locating Elements
150154
151155You can use the following locators to find elements in your Flutter app. Custom finders are built for WDIO. Refer to the [ wdio-flutter-by-service] ( https://www.npmjs.com/package/wdio-flutter-by-service?activeTab=readme ) .
152156
153- | Locator | Description |
154- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------|
155- | ` flutterByValueKey(value: string): Flutter.Locator ` | Locate by value key |
156- | ` flutterByValueKey$(value: string): WebdriverIO.Element ` | Locate single element by value key |
157- | ` flutterByValueKey$$(value: string): WebdriverIO.Element[] ` | Locate multiple elements by value key |
158- | ` flutterBySemanticsLabel(label: string): Flutter.Locator ` | Locate by semantics label |
159- | ` flutterBySemanticsLabel$(label: string): WebdriverIO.Element ` | Locate single element by semantics label |
160- | ` flutterBySemanticsLabel$$(label: string): WebdriverIO.Element[] ` | Locate multiple elements by semantics label |
161- | ` flutterByText(text: string): Flutter.Locator ` | Locate by text |
162- | ` flutterByText$(text: string): WebdriverIO.Element ` | Locate single element by text |
163- | ` flutterByType$(text: string): WebdriverIO.Element ` | Locate single element by Type(Checkbox, RadioButton, ListView) |
164- | ` flutterByType$$(text: string): WebdriverIO.Element[] ` | Locate multiple elements by text(Checkbox, RadioButton, ListView)|
165- | ` flutterDoubleClick(element: WebdriverIO.Element): WebdriverIO.Element ` | Double click on an element |
166- | ` flutterWaitForAbsent(options: { element: WebdriverIO.Element; locator: Flutter.Locator; }): void ` | Wait for an element to be absent |
167- | ` flutterScrollTillVisible(options: { finder: WebdriverIO.Element; scrollView?: WebdriverIO.Element; scrollDirection?: 'up','right','down','left'; delta?: number; maxScrolls?: number; settleBetweenScrollsTimeout?: number; dragDuration?: number; }): Promise<WebdriverIO.Element> ` | Scroll until an element is visible |
157+ | Locator | Description |
158+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
159+ | ` flutterByValueKey(value: string): Flutter.Locator ` | Locate by value key |
160+ | ` flutterByValueKey$(value: string): WebdriverIO.Element ` | Locate single element by value key |
161+ | ` flutterByValueKey$$(value: string): WebdriverIO.Element[] ` | Locate multiple elements by value key |
162+ | ` flutterBySemanticsLabel(label: string): Flutter.Locator ` | Locate by semantics label |
163+ | ` flutterBySemanticsLabel$(label: string): WebdriverIO.Element ` | Locate single element by semantics label |
164+ | ` flutterBySemanticsLabel$$(label: string): WebdriverIO.Element[] ` | Locate multiple elements by semantics label |
165+ | ` flutterByText(text: string): Flutter.Locator ` | Locate by text |
166+ | ` flutterByText$(text: string): WebdriverIO.Element ` | Locate single element by text |
167+ | ` flutterByType$(text: string): WebdriverIO.Element ` | Locate single element by Type(Checkbox, RadioButton, ListView) |
168+ | ` flutterByType$$(text: string): WebdriverIO.Element[] ` | Locate multiple elements by text(Checkbox, RadioButton, ListView) |
169+ | ` flutterDoubleClick(element: WebdriverIO.Element): WebdriverIO.Element ` | Double click on an element |
170+ | ` flutterWaitForAbsent(options: { element: WebdriverIO.Element; locator: Flutter.Locator; }): void ` | Wait for an element to be absent |
171+ | ` flutterScrollTillVisible(options: { finder: WebdriverIO.Element; scrollView?: WebdriverIO.Element; scrollDirection?: 'up','right','down','left'; delta?: number; maxScrolls?: number; settleBetweenScrollsTimeout?: number; dragDuration?: number; }): Promise<WebdriverIO.Element> ` | Scroll until an element is visible |
168172
169173For more examples, see the [ test file] ( https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/blob/main/test/specs/test.e2e.js ) .
0 commit comments