npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zosmaai/zosma-qa-appium

v0.0.8

Published

Appium mobile testing runner for zosma-qa

Readme

@zosmaai/zosma-qa-appium

Appium mobile testing runner for zosma-qa — the open-source QA platform for Web, Mobile, Backend, and Load testing.

This package provides a Playwright-like test API for mobile apps, powered by WebdriverIO and Appium. It includes agent-friendly test helpers, automatic device detection, and zero-config defaults for React Native projects.

Installation

npm install -D @zosmaai/zosma-qa-appium

Peer dependency: You'll need Appium installed globally or locally:

npm install -g appium
appium driver install uiautomator2   # Android
appium driver install xcuitest       # iOS

Usage

Write a test

// tests/login.appium.ts
import { test } from '@zosmaai/zosma-qa-appium';
import { tapButton, fillInput, expectText } from '@zosmaai/zosma-qa-appium';

test.describe('Login Flow', () => {
  test.beforeEach(async ({ driver }) => {
    // driver is a WebdriverIO Browser instance
  });

  test('should login with valid credentials', async ({ driver }) => {
    await fillInput(driver, '[email protected]', { testID: 'email-input' });
    await fillInput(driver, 'password123', { testID: 'password-input' });
    await tapButton(driver, { testID: 'login-button' });
    await expectText(driver, 'Welcome back');
  });
});

Configure

// zosma.config.ts
import { defineConfig } from '@zosmaai/zosma-qa-core';

export default defineConfig({
  plugins: ['appium'],
  baseURL: 'localhost',
  browsers: ['chromium'],
});

Features

| Feature | Description | |---|---| | Playwright-like API | test(), test.describe(), test.beforeEach(), test.afterEach() | | Fixture injection | Tests receive { driver } — a WebdriverIO Browser instance | | Agent-friendly helpers | tapButton(), fillInput(), swipeDown(), expectText(), waitForElement() | | Auto-detection | Finds app path, app ID, and dev server automatically for React Native projects | | Session management | Handles WebdriverIO session lifecycle with retry and cleanup | | Device management | iOS Simulator and Android Emulator detection and control | | Server management | Starts and stops Appium server automatically with port allocation | | Multi-platform | React Native, iOS, Android, Flutter, React Native Web |

Test Helpers

High-level, agent-readable functions that wrap raw WebDriver calls:

import {
  tapButton,       // Tap a button by testID or text
  fillInput,       // Fill a text input
  expectText,      // Assert text is visible on screen
  waitForElement,  // Wait for an element to appear
  swipeDown,       // Swipe down gesture
  swipeUp,         // Swipe up gesture
  scrollToElement, // Scroll until element is visible
  takeScreenshot,  // Capture screenshot
} from '@zosmaai/zosma-qa-appium';

Each helper supports multiple locator strategies:

// By testID (recommended)
await tapButton(driver, { testID: 'submit-btn' });

// By visible text
await tapButton(driver, { text: 'Submit' });

// By raw selector
await tapButton(driver, '~submit-btn');

Platform Support

| Platform | Automation Engine | Status | |---|---|---| | React Native | XCUITest (iOS) / UIAutomator2 (Android) | Available | | iOS Native | XCUITest | Available | | Android Native | UIAutomator2 | Available | | Flutter | Flutter driver | Available | | React Native Web | Chromium | Available |

Smart Defaults

The runner applies sensible defaults so you can start testing without configuration:

| Setting | Default | Notes | |---|---|---| | platformName | ReactNative | Auto-detected from project | | appiumPort | 4723 | Auto-allocated if busy | | appiumHost | localhost | | | testDir | ./tests | | | workers | 1 | Mobile tests run serially | | timeout | 30000 | 30 seconds per test | | autoLaunchSimulator | true | Launches simulator if needed |

Advanced: Raw WebDriver Access

The driver fixture is a standard WebdriverIO Browser instance. Use it directly for anything the helpers don't cover:

test('advanced interaction', async ({ driver }) => {
  const element = await driver.$('~my-element');
  await element.click();

  const text = await element.getText();
  expect.toBe(text, 'Expected value');
});

Part of zosma-qa

Full documentation: github.com/zosmaai/zosma-qa

License

Apache-2.0