agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/testing/appium/SKILL.md

appium

Skill15 starsChanged 46 days agoMITView on GitHub

Expert Appium mobile automation covering iOS, Android, and cross-platform UI testing. Use when automating mobile app workflows, end-to-end device testing, or configuring Appium drivers.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use WebDriverWait with expected conditions rather than static sleeps:

    line 87
  2. Very specific:

    Always Prefer Accessibility IDs (~locator): Coordinate with mobile developers to assign accessibilityIdentifier (iOS) and …

    line 105
  3. Very specific:

    Use Appium 2.x Independent Drivers: Install only needed drivers (appium driver install uiautomator2) to keep server installations …

    line 106
  4. Distinctive:

    Use XPath locators for mobile hierarchies: XPath traversal on mobile UI trees is extremely slow and brittle across OS updates.

    line 112

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Appium

Appium is an open-source framework for automating native, mobile web, and hybrid applications on iOS, mobile Android, and Windows desktop platforms. It uses the WebDriver protocol.

When to Use

  • Cross-Platform Mobile UI Automation: Automating functional end-to-end tests across native iOS, Android, and mobile web browsers.
  • Real Device Cloud Grid Testing: Executing mobile regression suites across device clouds (BrowserStack, Sauce Labs, AWS Device Farm).
  • Hybrid & Native App Interactions: Testing apps that transition between native UI components and embedded WebViews.
  • Physical Hardware Button Testing: Automating device rotation, biometric dialogs, network toggles, and volume keys.

Quick Start

// wdio.conf.js
capabilities: [
  {
    platformName: "Android",
    "appium:deviceName": "Pixel_3a",
    "appium:app": "/path/to.apk",
    "appium:automationName": "UiAutomator2",
  },
];

// test.js
await $("~Login Button").click(); // Accessibility ID
await $('android=new UiSelector().text("Submit")').click();

Core Concepts

W3C WebDriver Protocol for Mobile

Appium translates standard W3C WebDriver HTTP wire protocol commands into platform-specific native automation drivers (XCUITest for iOS, UIAutomator2 for Android):

[ Test Script (Node/Python/Java) ] ──(W3C WebDriver)──→ [ Appium Server (Port 4723) ]
                                                              ├──→ [ XCUITest Driver (iOS) ]
                                                              └──→ [ UIAutomator2 Driver (Android) ]

Appium 2.0 Desired Capabilities (Options Classes)

Modern Appium 2.x replaces generic capability maps with strongly-typed platform options:

import { remote } from "webdriverio";

const driver = await remote({
  protocol: "http",
  hostname: "127.0.0.1",
  port: 4723,
  path: "/",
  capabilities: {
    platformName: "Android",
    "appium:automationName": "UiAutomator2",
    "appium:deviceName": "Pixel_8_Pro",
    "appium:app": "/path/to/app-release.apk",
    "appium:autoGrantPermissions": true,
  },
});

Mobile Element Locators & Explicit Waits

Locating elements safely using accessibility identifiers and explicit condition waits:

// Prefer accessibility id (cross-platform and resilient)
const submitButton = await driver.$("~submit_order_button");
await submitButton.waitForDisplayed({ timeout: 10000 });
await submitButton.click();

Common Patterns

Explicit Wait for Dynamic Mobile Elements

Problem: Network or animation lag causes NoSuchElementException when interacting with mobile elements immediately after screen transitions.

Solution: Use WebDriverWait with expected conditions rather than static sleeps:

from appium.webdriver.common.appiumby import AppiumBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

def tap_when_ready(driver, accessibility_id: str, timeout: int = 10):
    element = WebDriverWait(driver, timeout).until(
        EC.element_to_be_clickable((AppiumBy.ACCESSIBILITY_ID, accessibility_id))
    )
    element.click()

Best Practices

Do:

  • Always Prefer Accessibility IDs (~locator): Coordinate with mobile developers to assign accessibilityIdentifier (iOS) and contentDescription (Android).
  • Use Appium 2.x Independent Drivers: Install only needed drivers (appium driver install uiautomator2) to keep server installations lightweight.
  • Implement Explicit Waits Instead of Static Sleep: Use .waitForDisplayed() rather than arbitrary sleep(5000) pauses.
  • Reset State with noReset / fullReset Intelligently: Use noReset: true to avoid reinstalling the app on every single test case.

Don't:

  • Use XPath locators for mobile hierarchies: XPath traversal on mobile UI trees is extremely slow and brittle across OS updates.
  • Hardcode absolute file paths: Use environment variables or relative paths for APK and IPA binaries.
  • Ignore Appium Inspector: Use the official Appium Inspector GUI to verify element accessibility hierarchies and attributes.

Troubleshooting

ErrorCauseSolution
NoSuchDriverException / Driver not installedMissing platform driver in Appium 2.x server.Run appium driver install uiautomator2 or appium driver install xcuitest.
Original error: Could not find 'adb.html'Android SDK ANDROID_HOME or PATH not set.Export ANDROID_HOME and add $ANDROID_HOME/platform-tools to system PATH.
WebDriverException: Session not createdCapabilities mismatch with connected device/emulator.Verify platformVersion, deviceName, and automationName match connected hardware.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.