{"id":24164906,"url":"https://github.com/sw-tester/appium-flutter-client","last_synced_at":"2025-09-20T10:32:09.373Z","repository":{"id":186266268,"uuid":"674918413","full_name":"sw-tester/appium-flutter-client","owner":"sw-tester","description":"Appium Flutter Client","archived":false,"fork":false,"pushed_at":"2023-10-22T14:38:31.000Z","size":26,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T05:23:30.019Z","etag":null,"topics":["appium","flutter","java","selenium"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sw-tester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-05T06:54:55.000Z","updated_at":"2024-10-04T04:36:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"c855497e-d745-4294-8eac-84b5a3db9788","html_url":"https://github.com/sw-tester/appium-flutter-client","commit_stats":null,"previous_names":["5v1988/appium-flutter-client","sw-tester/appium-flutter-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sw-tester%2Fappium-flutter-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sw-tester%2Fappium-flutter-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sw-tester%2Fappium-flutter-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sw-tester%2Fappium-flutter-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sw-tester","download_url":"https://codeload.github.com/sw-tester/appium-flutter-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233655145,"owners_count":18709255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium","flutter","java","selenium"],"created_at":"2025-01-12T19:43:13.506Z","updated_at":"2025-09-20T10:32:04.042Z","avatar_url":"https://github.com/sw-tester.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Appium Flutter Java Binding\n\n**Introduction**\n\nThis library helps to write Flutter tests in Java\nfor [Appium Flutter Driver](https://github.com/appium-userland/appium-flutter-driver). It mainly\noffers binding to find elements on mobile app using various locating strategies, and also executes\ncustom flutter commands This [page](https://github.com/appium-userland/appium-flutter-driver)\ncontains all necessary details in preparing Flutter app under test.\n\n**Installation**\n\nPre-requisites:\n1. Install Appium by following the steps mentioned [here](https://appium.io/docs/en/2.0/quickstart/install/)\n2. Install Appium Flutter Driver from source as below:\n    ```npm\n    appium driver install --source=npm appium-flutter-driver\n    ```\n3. Flutter app under test needs to be compiled in debug or profile mode and Flutter Driver extension\nalso needs to be enabled by adding this line `enableFlutterDriverExtension()` before calling app's \nrun method in `main.dart`\n4. Include flutter_driver from Flutter SDK as dev dependency\n\nThis library, Appium Flutter Binding which is based on Java can be installed by adding the following\ndependency on the project\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.5v1988\u003c/groupId\u003e\n    \u003cartifactId\u003eappium-flutter-client\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.5\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n```groovy\nimplementation group: 'io.github.5v1988', name: 'appium-flutter-client', version: '1.0.5'\n```\n\nOnce the above steps are done, Appium Flutter Driver can be instantiated by passing in necessary\nmobile capabilities, including `AutomationName` as `Flutter`. The below code snippet is one such \nexample for the reference.\n\n```java\n    AppiumDriverLocalService service = new AppiumServiceBuilder()\n    .usingAnyFreePort().build();\n    service.start();\n    if (service == null || !service.isRunning()) {\n    throw new AppiumServerHasNotBeenStartedLocallyException(\n    \"An appium server node is not started!\");\n    }\n    BaseOptions options = new BaseOptions()\n    .setPlatformName(\"Android\")\n    .setAutomationName(\"Flutter\")\n    .amend(\"appium:app\", \"/path/to/app\")\n    .amend(\"autoGrantPermissions\", \"true\");\n    AppiumFlutterDriver driver = new AppiumFlutterDriver(service.getUrl(), options);\n```\n\nAs for locating an element, there are many ways by which the flutter elements can be located, and \nthe most prominent one is `ByValueKey`, which is equivalent to `id` in web context. If in case, you \ndon't see it for the elements, it's better to talk with the developers to add `Key` for input elements\n, and all the available locating strategies are listed down as below:\n\n```java\n  VALUE_KEY(\"ByValueKey\"),\n  TYPE(\"ByType\"),\n  TOOL_TIP(\"ByTooltipMessage\"),\n  TEXT(\"ByText\"),\n  SEMANTICS_LABEL(\"BySemanticsLabel\"),\n  ANCESTOR(\"Ancestor\"),\n  DESCENDANT(\"Descendant\"),\n  PAGE_BACK(\"PageBack\");\n```\n\nAdding some code snippets to locate elements using this library.\n\n```java\n//This is by key\nprivate FlutterElement getEmailTextBox() {\n  return driver.findElement(FlutterBy.VALUE_KEY, \"KEYS.loginTextbox\");\n}\n\n//This is by descendant\nprivate FlutterElement getFirstItemFromList() {\n    return driver.findDescendantElement(\n    driver.findElement(FlutterBy.TYPE, \"DefaultRefreshIndicator\"),\n    driver.findElement(FlutterBy.TYPE, \"ListItem\"),\n    false,\n    true);\n    }\n```\n\nUsing FlutterCommand from this library, you could able to execute them by passing in necessary parameters\nthat each command takes in. Status of all implemented Flutter commands can be tracked from [here](https://github.com/appium-userland/appium-flutter-driver)\n\nThe below are some example snippets to perform certain interactions on the screen.\n\n```java\n//To scroll for an element in Flutter context\nprotected FlutterCommand command = new FlutterCommand(driver);\ncommand.execute(Command.SCROLL_INFO_VIEW, element, ImmutableMap.of(\"alignment\", 0.1));\n\n// To render the tree for the given screen on the flutter app\nString flutterTree = driver.getRenderTree();\n\n//To switch to Native context and find an element using XPath\ndriver.switchToContext(\"NATIVE_APP\");\nWebElement signIn = driver.findElement(By.xpath(\"//*[@content-desc='Sign in']\"));\nsignIn.click();\ndriver.switchToContext(\"FLUTTER\");\n\n```\n\nPlease feel free to raise if you come across any issues in using this library.\n\n\n[Veera](https://www.linkedin.com/in/veera-qa/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsw-tester%2Fappium-flutter-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsw-tester%2Fappium-flutter-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsw-tester%2Fappium-flutter-client/lists"}