Skip to main content

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:

  1. Log a warning in the console.
  2. Insert a TODO_UNSUPPORTED_ACTION in the generated YAML file.
  3. 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


Download files

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

Source Distribution

pythontomaestro-0.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

pythontomaestro-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

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

Hashes for pythontomaestro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55f3c92dceae392ba15f9cbadf5cc0a1184bf85c71a4e7dc9d4cafd83c2a22e3
MD5 be24e1dfe333ab09676745e18e97d87a
BLAKE2b-256 daef73f78e22ff1eec27cbe7dd37574254f0cef0218729239873c11e12f06c0a

See more details on using hashes here.

File details

Details for the file pythontomaestro-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pythontomaestro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd1cf49a6a16bd4799f5397184a24ff16dd804458cb1ae429652a7d708b5b909
MD5 a59102a816e417c8740866ee4397bbdc
BLAKE2b-256 a82766a18d8ec59bb90a727adbf7dcdc7c1426b5d48805b7cdfb0367240aa8a1

See more details on using hashes here.

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