A tool to convert Python automation scripts (Selenium/Appium) to Maestro YAML flows.
Project description
Python to Maestro Converter
A simple tool to convert existing Python automation scripts (Selenium, Appium) into Maestro YAML flows.
Installation
pip install pythontomaestro
Usage
pythontomaestro <input_file_or_dir> <output_dir>
Example:
pythontomaestro tests/my_test.py output/
This will read tests/my_test.py, convert the automation steps, and save the resulting YAML flows into the output/ directory (e.g., output/test_login_success.yaml).
Features
- Parses Python AST to extract automation steps.
- Maps Selenium/Appium commands (click, input, navigate) to Maestro commands (tapOn, inputText, openLink).
- Generates valid Maestro YAML flows.
⚠️ Limitations & Manual Review
Not everything can be converted automatically.
Python scripts often contain complex logic (loops, conditionals, custom helper methods) that do not map 1:1 to Maestro's declarative YAML syntax.
When the tool encounters such logic, it will:
- Log a warning in the console.
- Insert a
TODO_UNSUPPORTED_ACTIONin the generated YAML file. - Add a top-level warning comment to the file.
Example:
# WARNING: This flow contains unsupported actions (TODOs). Manual review required.
- tapOn:
text: Login
- TODO_UNSUPPORTED_ACTION: 'Unsupported control flow: If statement (Suggestion: Unroll loops or use runScript for simple logic)'
You must manually review the generated YAML files and address any TODO items.
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 pythontomaestro-0.1.0.tar.gz.
File metadata
- Download URL: pythontomaestro-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f3c92dceae392ba15f9cbadf5cc0a1184bf85c71a4e7dc9d4cafd83c2a22e3
|
|
| MD5 |
be24e1dfe333ab09676745e18e97d87a
|
|
| BLAKE2b-256 |
daef73f78e22ff1eec27cbe7dd37574254f0cef0218729239873c11e12f06c0a
|
File details
Details for the file pythontomaestro-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pythontomaestro-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd1cf49a6a16bd4799f5397184a24ff16dd804458cb1ae429652a7d708b5b909
|
|
| MD5 |
a59102a816e417c8740866ee4397bbdc
|
|
| BLAKE2b-256 |
a82766a18d8ec59bb90a727adbf7dcdc7c1426b5d48805b7cdfb0367240aa8a1
|