mcpField
A
appium

appium

github.com/partme-aiTesting & quality716157 installsUpdated 3w ago
Repository

About appium

appium is a skill for developers writing automated tests for native and hybrid Android and iOS apps. It covers capabilities, element location, device interactions, and CI execution practices.

Key features

  1. 01Android and iOS test workflows
  2. 02Desired capabilities examples
  3. 03Element location strategies
  4. 04Gesture and device interaction guidance
  5. 05CI execution practices

Use cases

  1. 01Automating native mobile app tests
  2. 02Testing hybrid Android or iOS apps
  3. 03Choosing element selectors and waits
  4. 04Running mobile tests in CI

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/partme-ai/full-stack-skills --skill appium

After installing, type/appiumin Claude Code to confirm it loaded.

Bundled filesLICENSE.txt

Details

From the project README

When to use this skill

Use this skill whenever the user wants to:

  • Write automated tests for Android and iOS native or hybrid mobile applications
  • Locate elements using accessibility ID, ID, XPath, or class name
  • Perform gestures (tap, swipe, scroll) and handle device interactions
  • Configure desired capabilities for different devices and platforms
  • Integrate Appium tests into CI/CD pipelines (Jenkins, GitHub Actions)

How to use this skill

Workflow
  1. Set up the environment: install Appium Server, drivers (UiAutomator2 for Android, XCUITest for iOS), and language bindings
  2. Define capabilities: specify device name, platform, app path, and automation engine
  3. Write test scripts: locate elements, perform actions, and assert results
  4. Run in CI: execute on real devices or emulators with parallel execution and reporting
1. Desired Capabilities
desired_caps = {
    "platformName": "Android",
    "deviceName": "Pixel_6",
    "app": "/path/to/app.apk",
    "automationName": "UiAutomator2",
    "noReset": True,
}
2. Test Example (Python)
from appium import webdriver
from appium.webdriver.common.appiumby import AppiumBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_caps)
wait = WebDriverWait(driver, 10)

# Login flow
username = wait.until(EC.presence_of_element_located((AppiumBy.ACCESSIBILITY_ID, "username")))
username.send_keys("testuser")

driver.find_element(AppiumBy.ACCESSIBILITY_ID, "password").send_keys("secret")
driver.find_element(AppiumBy.ACCESSIBILITY_ID, "login-button").click()

# Assert
welcome = wait.until(EC.presence_of_element_located((AppiumBy.ACCESSIBILITY_ID, "welcome")))
assert welcome.is_displayed()

driver.quit()
3. Test Example (Java)
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "Android");
caps.setCapability("deviceName", "Pixel_6");
caps.setCapability("app", "/path/to/app.apk");
caps.setCapability("automationName", "UiAutomator2");

AndroidDriver driver = new AndroidDriver(new URL("http://localhost:4723/wd/hub"), caps);
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

driver.findElement(AppiumBy.accessibilityId("username")).sendKeys("testuser");
driver.findElement(AppiumBy.accessibilityId("login-button")).click();
assertTrue(wait.until(ExpectedConditions.visibilityOfElementLocated(AppiumBy.accessibilityId("welcome"))).isDisplayed());

driver.quit();

Best Practices

  • Prefer accessibility ID or resource ID for element location; avoid fragile XPath expressions
  • Use explicit waits and retry logic; capture screenshots and logs on failure
  • Test across multiple devices and OS versions using a device matrix
  • Store sensitive information (app paths, credentials) in environment variables
  • Use Appium's built-in gesture APIs for swipe, scroll, and long-press actions

Resources

Keywords

appium, mobile automation, Android, iOS, UiAutomator2, XCUITest, accessibility ID, desired capabilities, cross-platform, UI testing, mobile testing

Comments

Markdown supported