Skip to main content

A universal automation adapter providing a uiautomator2-compatible interface for iOS (WDA) and potentially PC platforms.

Project description

u2-adapter

A Python library designed to provide a unified, uiautomator2-compatible interface for various automation drivers.

Currently supports:

  • iOS: Via facebook-wda.

Planned support:

  • PC (Windows): Via WinAppDriver or similar.
  • PC (Mac): Via native accessibility APIs.

Installation

pip install u2-adapter

Usage (iOS Example)

This adapter wraps a facebook-wda driver instance, allowing you to use uiautomator2 syntax.

import wda
from u2_adapter import WdaAdapter

# Connect to your iOS device using facebook-wda
c = wda.Client('http://localhost:8100')
wda_driver = c.session()

# Wrap it with the adapter
d = WdaAdapter(wda_driver)

# Now you can use uiautomator2-like syntax
d(text="Settings").click()
d(text="General").wait(timeout=3)

# Existence check
if d(text="Bluetooth").exists:
    print("Bluetooth is visible")

Features

  • Unified Syntax: Write once, think in uiautomator2, run on supported platforms.
  • Selector Mapping: Maps text, resourceId, etc., to platform-specific queries (e.g., Predicates for iOS).
  • Element Operations: .click(), .wait(), .get_text(), .set_text().
  • XPath Support: Automatic attribute translation (e.g., @text -> @label for iOS).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

u2_adapter-0.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

u2_adapter-0.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file u2_adapter-0.0.1.tar.gz.

File metadata

  • Download URL: u2_adapter-0.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for u2_adapter-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c186d59e9871d842a72bcfcc00ecbde920d5f54a33ec9e66abc28aa42684f201
MD5 5bab64c2181aefdd8aac74bf40141160
BLAKE2b-256 3e218ca4bb22739d997e352d1d5521dec2abfacc9bb10d6795cae12a4892167f

See more details on using hashes here.

Provenance

The following attestation bundles were made for u2_adapter-0.0.1.tar.gz:

Publisher: publish.yml on bodphi/u2_adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file u2_adapter-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: u2_adapter-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for u2_adapter-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38eba75c17076022996cbe270f8c31250a427567773bc18286f70e8d12b755c7
MD5 87a35a9e0cc22062a520f1e88d44c469
BLAKE2b-256 73d90dea3fd766f84bc9c2588f607218abf8a789adeb96e98a62e37391326cc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for u2_adapter-0.0.1-py3-none-any.whl:

Publisher: publish.yml on bodphi/u2_adapter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page