Skip to main content

Modern, Intelligent Mobile Automation Framework

Project description

FlowPilot Mobile

Modern, Python-first mobile automation framework. Provides clean Playwright-style APIs for smart mobile automation with a hidden runtime engine.

🚀 Installation

Prerequisites

  • Python 3.11 or higher
  • Physical Android Device

Install via pip

pip install flowpilot-mobile

🌟 The FlowPilot "Smart" Advantage

FlowPilot includes an Intelligent Layer that handles the "messy" parts of mobile testing automatically:

  • Auto-Scroll Search: Automatically swipes and retries if an element is off-screen.
  • Smart Locator Scoring: Distinguishes between actual inputs and "distractor" elements (like Search Labs icons).
  • Nearby Label Matching: Fills input fields based on the text labels next to them.
  • Self-Healing: Uses fuzzy matching for minor UI text changes (e.g., "Log In" vs "Login").
  • Automatic Device Reset: Automatically presses the Home button before and after every test to ensure a clean baseline.
  • Zero-Sleep Synchronization: Built-in polling ensures elements are ready before interaction.

🖥️ Live Monitoring & Evidence

Live Desktop Mirroring

See your phone's screen in a window on your desktop (Mac/Windows) during execution.

  • Requirement: scrcpy (Installed automatically via flowpilot setup).
  • Enable: Set mirror_screen: true in your flowpilot.yaml.

Automated Evidence

  • Screen Recording (MP4): Every test is recorded with hardware encoding (zero performance drop). Includes professional 1s padding.
  • Retention Policy: Automatically purges recordings older than 5 days (configurable) to save disk space.
  • Smart Screenshots: Captures specific UI states into .flowpilot/screenshots/.
  • Selective Cleanup: Wipes temporary flows and recent screenshots before each run while preserving your video history.

⚙️ Configuration (flowpilot.yaml)

Clients can overwrite framework behavior by placing a flowpilot.yaml in their project root:

project_name: "My Custom App"
output_dir: ".flowpilot"

# Features
record_video: true
mirror_screen: true

# Data Retention
recording_retention_days: 5

# Smart Engine Settings
auto_scroll: true
timeout: 30

🛠 Usage Guide

1. Smart Environment Setup

Automatically install ADB, Scrcpy, and all Python dependencies (Supports Mac and Windows):

flowpilot setup

2. Initialize Project

flowpilot init

3. Create a test (tests/test_demo.py)

def test_google_search(mobile):
    mobile.launch_app()
    mobile.fill("Search", "FlowPilot Mobile")
    mobile.press_key("Enter")
    mobile.screenshot("results")

4. Run Tests

flowpilot run tests/test_demo.py -s

📖 Public API Reference

Category Method Description Example
Lifecycle launch_app(pkg) Opens a specific app (defaults to Chrome). mobile.launch_app()
home() Returns to the device Home Screen. mobile.home()
back() Simulates the hardware Back button. mobile.back()
navigate(url) Opens a specific URL in the browser. mobile.navigate("https://google.com")
Interactions tap(target) Smart Tap: Auto-scrolls and waits for visibility. mobile.tap("Settings")
fill(target, val) Smart Fill: Finds nearest input to a label. mobile.fill("Username", "admin")
fill_focused(val) Active Field: Types into currently focused input. mobile.fill_focused("secret")
press_key(key) Presses hardware keys (Enter, Home, Back). mobile.press_key("Enter")
clear(target) Clears text from an input field. mobile.clear("Search")
Gestures open_notifications() Pulls down the notification shade (Left). mobile.open_notifications()
open_quick_settings() Pulls down full Quick Settings (Center). mobile.open_quick_settings()
swipe_right() Horizontal swipe to see widgets/discover. mobile.swipe_right()
swipe_left() Horizontal swipe to return home. mobile.swipe_left()
scroll_down() Performs a smart downward scroll. mobile.scroll_down()
Discovery get_screen_text() Extracts all visible text from the screen. texts = mobile.get_screen_text()
find_text(target) Checks if specific text is visible (True/False). if mobile.find_text("Login"):
list_elements(type) Returns a list of all visible elements. mobile.list_elements("button")
Verification wait_for(target) Polls until the element is found. mobile.wait_for("Success")
visible(target) Asserts that an element is on screen. mobile.visible("Profile")
visual_assert(id) Visual Check: Compares with a baseline image. mobile.visual_assert("login")
Media screenshot(name) Saves a screenshot to .flowpilot/screenshots/. mobile.screenshot("step_1")

🤖 CLI Commands

Command Description
flowpilot setup Automatically installs ADB, Scrcpy, and requirements.
flowpilot interactive New: Start a live step-by-step automation session.
flowpilot init Scaffolds a new project structure.

| flowpilot run | Executes tests with smart logs. | | flowpilot doctor | Checks ADB and device connectivity. | | flowpilot devices | Lists all connected physical Android devices. | | flowpilot report | Generates a rich HTML summary of test runs. |


🛡 Engineering Principles

  1. Hide Complexity: Zero YAML or runtime engine logic exposed.
  2. Text-First: Locators prioritize display text over brittle XPaths.
  3. Hardware-Accelerated: Native MP4 capture and Scrcpy mirroring with zero host lag.
  4. Resilient Reset: Automated pre/post Home screen logic for repeatability.

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

flowpilot_mobile_framework-1.1.3.tar.gz (29.3 kB view details)

Uploaded Source

Built Distributions

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

flowpilot_mobile_framework-1.1.3-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

flowpilot_mobile_framework-1.1.3-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

flowpilot_mobile_framework-1.1.3-cp311-cp311-win32.whl (898.2 kB view details)

Uploaded CPython 3.11Windows x86

flowpilot_mobile_framework-1.1.3-cp311-cp311-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file flowpilot_mobile_framework-1.1.3.tar.gz.

File metadata

File hashes

Hashes for flowpilot_mobile_framework-1.1.3.tar.gz
Algorithm Hash digest
SHA256 77b6ab5e76bac4b49c669327b5ef6a420e9711fb80ea5ec42af5483d00463234
MD5 73db1f4d49262c56680f3dee8370a06c
BLAKE2b-256 15fcd93e46adbda0a4e629cf017593f9a1f5c8940a3cea7994b5f3c6a58b38a6

See more details on using hashes here.

File details

Details for the file flowpilot_mobile_framework-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for flowpilot_mobile_framework-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb065f60649887c9cf39a1b2d81a7b61241c79245ad1658324e6d5719b79ac2c
MD5 60e658e3efd42064fc851d37946aad6a
BLAKE2b-256 f8ffc28fcf899d09129ddf29a56eaae105b5e3ef7dd46e32033495b3e699cf81

See more details on using hashes here.

File details

Details for the file flowpilot_mobile_framework-1.1.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for flowpilot_mobile_framework-1.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9e75ed055d5072aa503e3bfb4e2eed5a0a592bb26f4bd833730e367727c66891
MD5 81fdb14c92caa6a8153d444b02c60d62
BLAKE2b-256 1d7d4942c2c0ebd76ab4ed99d75d2cfbee541fc6385cc650f497bd361c862c61

See more details on using hashes here.

File details

Details for the file flowpilot_mobile_framework-1.1.3-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for flowpilot_mobile_framework-1.1.3-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 5368e2b4b87cc84c7cdad553aefa8deda60aa609dbb3a82479af684f7f78ccd8
MD5 a6ee3d99332f59a5b5f4abf066b5a5e7
BLAKE2b-256 75d4ddda490f1b7809f1f27dcfd66f59e7969b14dbc916453bc9f654667a5554

See more details on using hashes here.

File details

Details for the file flowpilot_mobile_framework-1.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowpilot_mobile_framework-1.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16a31e5ad10e4a0b2127848861631d1b77293c093774a1f0c06f004e85b3d805
MD5 65f847baeecc6844c2a2e5e919dbefad
BLAKE2b-256 163096502fa882d85a28bd382b4885976ed60b19bfd21ede8b48eb028ded722d

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