Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Android UI Automator when an instrumented test must interact with visible Android UI beyond your app—such as a permission dialog, Settings, the launcher, the notification shade, or another installed app. For new tests, Android recommends the modern UI Automator 2.4 API and its Kotlin DSL. Use Espresso for many View-based tests confined to one app, or Compose testing APIs for Compose-focused interfaces.

When UI Automator is the right tool

The deciding question is whether the test needs to cross an app or system boundary. UI Automator can inspect and act on visible UI across windows and apps, making it suitable for end-to-end user journeys that involve system surfaces or another installed app. It is an instrumented test, so it runs on an Android emulator or device rather than as a local host-side JVM test.

For a flow contained within one app, choose the framework that matches its UI and synchronization needs:

Tool Best fit Choose it when
UI Automator Cross-app functional UI, system UI, and installed apps The scenario crosses an app or system boundary.
Espresso View-based UI inside one target app You want synchronization with the app’s main thread for in-app interactions.
Compose testing APIs Compose screens and components The interface is primarily Compose and tests need controls suited to Compose, including time, animations, and recomposition.
Robolectric Local JVM tests on a workstation or CI The test should run on a host-side JVM rather than an emulator or device.

These tools are not interchangeable. Match the choice to the app boundary, UI toolkit, synchronization behavior, execution environment, and need to interact with system apps. See Android’s behavior UI test guidance and UI Automator guide.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Yojaro 4Pack Silicone Suction Phone Case Mount, Silicon Adhesive Smartphones Stand Sticky, Hands-Free Phone Accessories Holder for Selfies and Videos (Black & White & Translucent & Light Pink)
  • 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
  • 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
  • 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
  • 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
  • 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)

Set up a UI Automator 2.4 instrumented test

AndroidX lists UI Automator 2.4.0 as stable, dated July 1, 2026. Use that stable coordinate rather than the alpha dependency shown in some setup examples. In a Kotlin Gradle build, add:

dependencies {
    androidTestImplementation("androidx.test.uiautomator:uiautomator:2.4.0")
}

For a Groovy Gradle build, use:

dependencies {
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.4.0'
}

Put the test in the instrumented-test source set, typically app/src/androidTest/java/. Configure the module to use AndroidJUnitRunner:

Rank #2
Apple EarPods Headphones with USB-C Plug, Wired Ear Buds with Built-in Remote to Control Music, Phone Calls, and Volume
  • SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
  • HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
  • BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
  • COMPATIBILITY — Works with all devices that have a USB-C port.
  • INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.
android {
    defaultConfig {
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
}

If your project uses Kotlin DSL for the Android configuration, the equivalent runner setting is:

android {
    defaultConfig {
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }
}

Run the test with an emulator or connected Android device selected as the target. Android’s instrumented-test guide explains the execution model; the AndroidX release notes identify the stable library version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
PopSockets Adhesive Phone Grip, Holder- Black
  • Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
  • Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere, perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
  • Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style.
  • Black PopSockets: Simple, refined, and endlessly versatile. A timeless essential for any phone.
  • Travel Must-Have for People On the Go: A must-have travel accessory for flights, flying, airports, air travel, airplanes, planes, international trips, cruises, and long travel days. Key gadget for your airport haul, travel accessories and must-haves.

Write a test with the modern Kotlin DSL

The modern API centers on uiAutomator { }. Within the scope, use predicate-based queries such as onElement to find UI, perform actions, and assert a visible outcome. This example assumes the app under test has an accessible button with resource ID com.example.app:id/continue_button, and that tapping it displays text labeled “Welcome.” Replace those selectors and app identifier with values from your app.

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.uiAutomator
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.assertTrue

@RunWith(AndroidJUnit4::class)
class CheckoutUiTest {
    @Test
    fun continueOpensWelcomeScreen() = uiAutomator {
        val packageName = InstrumentationRegistry
            .getInstrumentation()
            .targetContext.packageName

        startApp(packageName)

        onElement {
            viewIdResourceName == "$packageName:id/continue_button"
        }.click()

        val welcome = onElementOrNull {
            text == "Welcome"
        }
        assertTrue("Welcome text should appear after continuing", welcome != null)
    }
}

UI Automator’s conditional element lookup includes wait behavior, so the test can wait for a matching element instead of immediately failing on the first query. Use onElement when the element is expected to exist; use onElementOrNull when absence is a meaningful result to check. The 2.4 DSL also provides onElements for matching multiple elements.

Rank #4
360° Rotating Stainless Steel Phone Tether Tab (Silvery 3-Pack) - Universal for iPhone & Other Phones (Fits Wristbands/Necklaces/Crossbody Straps)
  • [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
  • [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
  • [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
  • [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
  • [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly

Selectors should express user-visible or otherwise stable identity, such as a resource ID, text, or content description. Ensure controls have meaningful text labels or android:contentDescription values where appropriate. Coordinates depend on layout, density, orientation, and device size, so reserve them for cases where semantic selectors are not available.

Build a reliable UI Automator workflow

  1. Choose the test boundary. Use UI Automator for a journey involving Settings, a permission surface, launcher, notification shade, or a different app. Keep ordinary in-app View tests with Espresso when its synchronization is useful; use Compose testing APIs for Compose behavior.
  2. Establish the starting state. Use explicit app-state operations such as startApp or startActivity. Clear app data with clearAppData only when a clean state is part of the scenario; otherwise it can erase state the test intends to preserve.
  3. Locate by a stable property. Prefer resource IDs, text, or content descriptions. Avoid brittle coordinates when a semantic selector is available.
  4. Handle expected interruptions deliberately. For a permission prompt or other anticipated interruption, use a watcher such as watchFor rather than adding broad, unconditional actions that might dismiss unrelated UI.
  5. Assert the result the user would see. Verify the expected screen, label, or control after the action. A query succeeding is not a substitute for asserting the intended outcome.
  6. Use waits for the condition you need. The API offers built-in conditional waits, waitForAppToBeVisible, and waitForStable. A stable accessibility tree does not prove that all background work has finished; assert the target condition instead of treating stability as full application idleness.

Choose coverage for devices and configurations

Test the API levels, orientations, locales, and form factors that matter to your app. An emulator supports UI Automator runs and is useful for repeatable coverage; physical hardware can add compatibility coverage when real-device behavior matters. No particular phone model is required. Android’s UI test guidance recommends broadening coverage beyond a single phone configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anteel 2 Pack Silicone Suction Cup Phone Case Mount Double Sided, Hands-Free Silicon Phone Grip with Higher Suction Power for Selfies and Videos, Non Slip Phone Accessories (LightPink&White)
  • 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
  • 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
  • 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
  • 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
  • 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.

Do not infer a minimum Android version for the current 2.4.0 dependency from older guidance. Android’s legacy UI Automator documentation describes API 18 or higher for that framework guidance, but project-specific compatibility should be checked against the exact library version and intended device matrix.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Modern DSL versus legacy UI Automator tests

Older tests often use the 2.3-era API patterns UiDevice, UiObject2, and BySelector. The modern 2.4 DSL uses a different style centered on uiAutomator { } and predicate queries. Treat migration as an API change: do not copy a modern DSL snippet into a test still structured around legacy objects without adapting imports, queries, and actions. See Google’s legacy API guide alongside the modern guide.

Troubleshoot common failures

  • The test does not compile after adding the dependency: Confirm the AndroidX coordinate is in the module’s androidTestImplementation configuration, sync Gradle, and ensure the test is in the instrumented-test source set rather than src/test.
  • The test will not start on the selected target: UI Automator is instrumented. Select a running emulator or connected Android device and verify the module’s test runner is configured as androidx.test.runner.AndroidJUnitRunner.
  • A selector never finds the control: Check that the resource ID is the full runtime resource name, that the correct app or window is in the foreground, and that the control exposes the text or content description your predicate expects. Prefer a stable accessible identifier over a coordinate.
  • A system prompt interrupts the flow: Register a watcher for the specific expected dialog and define the intended response. If prompts are not part of the scenario, arrange a suitable test starting state rather than letting an unrelated dialog make selectors fail.
  • The test passes locally but fails after a screen change or delay: Replace arbitrary sleeps with a wait for the actual element or app state. Use stability checks only for their intended purpose; a stable accessibility tree does not guarantee every asynchronous operation is complete.
  • A test behaves differently across targets: Review API level, orientation, locale, and form factor coverage, and reproduce on both emulator and relevant physical hardware when device-specific behavior is in scope.

Or skip the browser setup

For website screenshot capture—not Android app UI testing—ScreenshotNeo provides a screenshot API and MCP server. Its one-call capture can return an image or PDF:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets; these steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server lets AI agents use screenshot and page-info tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up free for 1,000 screenshots a month, with no card required.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.