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
WinAppDriveror 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->@labelfor iOS).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c186d59e9871d842a72bcfcc00ecbde920d5f54a33ec9e66abc28aa42684f201
|
|
| MD5 |
5bab64c2181aefdd8aac74bf40141160
|
|
| BLAKE2b-256 |
3e218ca4bb22739d997e352d1d5521dec2abfacc9bb10d6795cae12a4892167f
|
Provenance
The following attestation bundles were made for u2_adapter-0.0.1.tar.gz:
Publisher:
publish.yml on bodphi/u2_adapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
u2_adapter-0.0.1.tar.gz -
Subject digest:
c186d59e9871d842a72bcfcc00ecbde920d5f54a33ec9e66abc28aa42684f201 - Sigstore transparency entry: 813113982
- Sigstore integration time:
-
Permalink:
bodphi/u2_adapter@79189403f896f4537d3d6d328872eaf539ae943d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bodphi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79189403f896f4537d3d6d328872eaf539ae943d -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38eba75c17076022996cbe270f8c31250a427567773bc18286f70e8d12b755c7
|
|
| MD5 |
87a35a9e0cc22062a520f1e88d44c469
|
|
| BLAKE2b-256 |
73d90dea3fd766f84bc9c2588f607218abf8a789adeb96e98a62e37391326cc4
|
Provenance
The following attestation bundles were made for u2_adapter-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on bodphi/u2_adapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
u2_adapter-0.0.1-py3-none-any.whl -
Subject digest:
38eba75c17076022996cbe270f8c31250a427567773bc18286f70e8d12b755c7 - Sigstore transparency entry: 813113983
- Sigstore integration time:
-
Permalink:
bodphi/u2_adapter@79189403f896f4537d3d6d328872eaf539ae943d -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bodphi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79189403f896f4537d3d6d328872eaf539ae943d -
Trigger Event:
workflow_dispatch
-
Statement type: