{"id":24713960,"url":"https://github.com/lkorth/device-automator","last_synced_at":"2025-10-09T12:31:22.554Z","repository":{"id":57726335,"uuid":"46204890","full_name":"lkorth/device-automator","owner":"lkorth","description":"An easy to use, Espresso like, syntax on top of the Android UI Automator testing framework","archived":false,"fork":false,"pushed_at":"2020-09-18T15:06:52.000Z","size":146,"stargazers_count":68,"open_issues_count":1,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T05:38:49.580Z","etag":null,"topics":["android","espresso","testing","ui-automated-tests","ui-automation","ui-testing"],"latest_commit_sha":null,"homepage":null,"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/lkorth.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}},"created_at":"2015-11-15T04:51:13.000Z","updated_at":"2025-04-11T13:53:11.000Z","dependencies_parsed_at":"2022-09-26T21:50:44.753Z","dependency_job_id":null,"html_url":"https://github.com/lkorth/device-automator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lkorth/device-automator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkorth%2Fdevice-automator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkorth%2Fdevice-automator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkorth%2Fdevice-automator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkorth%2Fdevice-automator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkorth","download_url":"https://codeload.github.com/lkorth/device-automator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkorth%2Fdevice-automator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001443,"owners_count":26083078,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","espresso","testing","ui-automated-tests","ui-automation","ui-testing"],"created_at":"2025-01-27T08:14:16.119Z","updated_at":"2025-10-09T12:31:22.252Z","avatar_url":"https://github.com/lkorth.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# device-automator\n\n [![Build Status](https://travis-ci.org/lkorth/device-automator.svg?branch=master)](https://travis-ci.org/lkorth/device-automator)\n\nDevice Automator is an Android library built on top of the [UI Automator testing\nframework](http://developer.android.com/training/testing/ui-testing/uiautomator-testing.html).\nDevice Automator provides an easy to use syntax for writing UI Automator tests that interact across\napps and the device itself. The Device Automator API very closely resembles the\n[Espresso](https://google.github.io/android-testing-support-library/docs/espresso/basics/index.html)\nAPI and similarly encourages test authors to think in terms of what a user might do while\ninteracting with the application - locating UI elements and interacting with them.\n\n## Setup\n\n### Download device-automator\n\nAdd the dependency in your `build.gradle` file:\n\n```groovy\ndependencies {\n  androidTestCompile 'com.lukekorth:device-automator:1.1.0'\n}\n```\n\nTo use the latest build from the `master` branch use:\n\n```groovy\ndependencies {\n  androidTestCompile 'com.lukekorth:device-automator:1.1.0-SNAPSHOT'\n}\n```\n\n### Set the instrumentation runner\n\nAdd the following line to your `build.gradle` file in `android.defaultConfig`:\n\n```\ntestInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n```\n\n## Writing Tests\n\nIt's recommended that you start every test from your device's home screen. To do that, run the\nfollowing before each test:\n\n```java\nonDevice().onHomeScreen();\n```\n\nTo launch an app, call:\n\n```java\nonDevice().launchApp(\"com.myapp.package\");\n```\n\nTo click on a view:\n\n```java\nonDevice(withText(\"My Button\")).perform(click());\n```\n\nTo type text:\n\n```java\nonDevice(withText(\"Enter text here\")).perform(setText(\"foobar\"));\n```\n\nTo make assertions after interacting:\n\n```java\nonDevice(withContentDescription(\"message field\")).check(text(containsString(\"my message\")));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkorth%2Fdevice-automator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkorth%2Fdevice-automator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkorth%2Fdevice-automator/lists"}