{"id":48826412,"url":"https://github.com/google/snippet-uiautomator","last_synced_at":"2026-04-14T18:29:28.406Z","repository":{"id":187463904,"uuid":"644154981","full_name":"google/snippet-uiautomator","owner":"google","description":"Mobly UiAutomator module for using Python code to operate UI actions on an Android device.","archived":false,"fork":false,"pushed_at":"2026-03-31T07:50:05.000Z","size":47296,"stargazers_count":49,"open_issues_count":2,"forks_count":24,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-10T09:03:44.517Z","etag":null,"topics":["android","google","mobly","python","uiautomator"],"latest_commit_sha":null,"homepage":"https://github.com/google/snippet-uiautomator","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-23T00:01:36.000Z","updated_at":"2026-03-31T07:50:10.000Z","dependencies_parsed_at":"2026-04-10T09:00:47.607Z","dependency_job_id":null,"html_url":"https://github.com/google/snippet-uiautomator","commit_stats":null,"previous_names":["google/snippet-uiautomator"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/google/snippet-uiautomator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnippet-uiautomator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnippet-uiautomator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnippet-uiautomator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnippet-uiautomator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/snippet-uiautomator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnippet-uiautomator/sbom","scorecard":{"id":437942,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/snippet-uiautomator","commit":"f044885c05977b030b2a421dd2f78094e800ad50"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/apk.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: snippet_uiautomator/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/apk.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snippet-uiautomator/apk.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/apk.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snippet-uiautomator/apk.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snippet-uiautomator/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snippet-uiautomator/ci.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:27","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 3 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T05:05:58.785Z","repository_id":187463904,"created_at":"2025-08-19T05:05:58.786Z","updated_at":"2025-08-19T05:05:58.786Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31810723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","google","mobly","python","uiautomator"],"created_at":"2026-04-14T18:29:27.615Z","updated_at":"2026-04-14T18:29:28.401Z","avatar_url":"https://github.com/google.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snippet UiAutomator\r\n\r\n[![Latest release](https://img.shields.io/github/release/google/snippet-uiautomator.svg)](https://github.com/google/snippet-uiautomator/releases/latest)\r\n[![APK Build Status](https://github.com/google/snippet-uiautomator/actions/workflows/apk.yml/badge.svg?branch=main)](https://github.com/google/snippet-uiautomator/actions)\r\n[![Python Build Status](https://github.com/google/snippet-uiautomator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/google/snippet-uiautomator/actions)\r\n\r\nThis is the Python wrapper based on\r\n[Mobly Snippet Lib](https://github.com/google/mobly-snippet-lib) for calling the\r\n[AndroidX UiAutomator](https://developer.android.com/reference/androidx/test/uiautomator/package-summary)\r\nAPIs.\r\n\r\n## Requirements\r\n\r\n-   Python 3.7+\r\n-   Android 8.0+ (SDK 26+)\r\n\r\n## Installation\r\n\r\n```shell\r\npip install snippet-uiautomator\r\n```\r\n\r\n### Initial Mobly Android Controller\r\n\r\n-   Inside Mobly Test\r\n\r\n    To use in a Mobly test, the Android device needs to be initialized in the\r\n    Mobly base test.\r\n\r\n    ```python\r\n    from mobly import base_test\r\n    from mobly.controllers import android_device\r\n\r\n    class MoblyTest(base_test.BaseTestClass):\r\n      def setup_class(self):\r\n        ad = self.register_controller(android_device)[0]\r\n    ```\r\n\r\n-   Outside Mobly Test\r\n\r\n    If not using in a Mobly test, such as when running in a Python terminal, the\r\n    Android device can be initialized with its serial number.\r\n\r\n    ```python\r\n    from mobly.controllers import android_device\r\n\r\n    ad = android_device.AndroidDevice('GOOG1234567890')\r\n    ```\r\n\r\nTo learn more about Mobly, visit\r\n[Getting started with Mobly](https://github.com/google/mobly/blob/master/docs/tutorial.md).\r\n\r\n### Launch UiAutomator Service\r\n\r\n\u003e [!WARNING]\r\n\u003e UiAutomation is a service that can only be used by one app at a time. If this\r\n\u003e service is already being registered by another app, Snippet UiAutomator will\r\n\u003e not be able to start. To resolve this issue, stop the app holding the\r\n\u003e UiAutomation service before calling Snippet UiAutomator.\r\n\r\nSnippet UiAutomator supports launching as one of\r\n[Mobly Android Device Service](https://github.com/google/mobly/blob/master/docs/android_device_service.md).\r\n\r\n```python\r\nfrom snippet_uiautomator import uiautomator\r\n\r\nad.services.register(\r\n    uiautomator.ANDROID_SERVICE_NAME, uiautomator.UiAutomatorService\r\n)\r\n\r\nad.ui(text='OK').click()\r\n```\r\n\r\n## Test\r\n\r\nRun unit tests for Python part:\r\n\r\n```shell\r\npytest\r\n```\r\n\r\nRun tests for Snippet part:\r\n\r\n```shell\r\ncd snippet_uiautomator/android\r\n./gradlew test\r\n```\r\n\r\nSet up pre-commit hooks, this will run some automated checks during each `git`\r\ncommit and possibly update some files that require changes:\r\n\r\n```shell\r\npip install pre-commit\r\npre-commit install\r\n```\r\n\r\n## API Usage\r\n\r\n- [Configurator](https://github.com/google/snippet-uiautomator/blob/main/docs/configurator.md)\r\n\r\n- [Selector](https://github.com/google/snippet-uiautomator/blob/main/docs/selector.md)\r\n\r\n- [UiDevice](https://github.com/google/snippet-uiautomator/blob/main/docs/uidevice.md)\r\n\r\n- [UiObject2](https://github.com/google/snippet-uiautomator/blob/main/docs/uiobject2.md)\r\n\r\n- [UiWatcher](https://github.com/google/snippet-uiautomator/blob/main/docs/uiwatcher.md)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fsnippet-uiautomator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fsnippet-uiautomator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fsnippet-uiautomator/lists"}