Metadata-Version: 2.4
Name: PyClickerRPA
Version: 0.2.0
Summary: Visual UI automation & testing tool: Windows + Android(ADB) automation, robust/self-healing image matching, OCR, node flow editor, recorder, a visual test framework (assertions, visual regression, HTML/JUnit reports) and a web console.
Author: Equinox
License-Expression: MIT
Project-URL: Homepage, https://github.com/Equinox/PyClickerRPA
Keywords: autoclicker,rpa,automation,opencv,template-matching,ocr,gui,windows,android,adb,testing,visual-regression,ui-testing
Classifier: Environment :: Win32 (MS Windows)
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Desktop Environment
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: opencv-python>=4.8
Requires-Dist: pywin32>=305; sys_platform == "win32"
Requires-Dist: pynput>=1.7
Requires-Dist: PySide6>=6.5
Provides-Extra: ocr
Requires-Dist: paddleocr>=2.7; extra == "ocr"
Requires-Dist: paddlepaddle>=2.5; extra == "ocr"
Provides-Extra: web
Requires-Dist: fastapi>=0.110; extra == "web"
Requires-Dist: uvicorn[standard]>=0.27; extra == "web"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: httpx>=0.24; extra == "dev"
Dynamic: license-file

# PyClickerRPA

A visual UI **automation & testing** tool. Automate Windows apps *and* Android
devices/emulators by what's on screen — image/text matching + mouse/keyboard (or
ADB) input — then turn those flows into a **visual test framework** with
assertions, visual-regression baselines, HTML/JUnit reports, and a **web console**
for remote runs.

Python/PySide6, started as a port of a Qt/C++ AutoClicker (still reads/writes the
same `.json` task format).

## Install

```
pip install PyClickerRPA
```

Optional extras:

```
pip install "PyClickerRPA[ocr]"   # PaddleOCR — find-text / read-text steps
pip install "PyClickerRPA[web]"   # FastAPI + uvicorn — web console
```

## Entry points

```
autoclicker                          # desktop GUI (flow editor / list editor / test tab)
autoclicker-run task.json --window "Notepad"   # headless run against a window
autoclicker-run task.json --adb                # run against an Android device (adb)
autoclicker-testkit suite.json --report out.html --junit out.xml   # run a test suite
autoclicker-web --suites-dir examples          # web console at http://127.0.0.1:8000
```

## Automation engine

- **Targets**: any visible window, the whole screen (multi-monitor + high-DPI
  aware), or an **Android device/emulator via ADB** (`--adb [serial]`).
- **Image matching**: OpenCV template match with **self-healing** by default —
  template → multi-scale → **ORB feature match** fallback (survives scaling /
  minor UI changes); **transparent-mask** templates (PNG alpha) ignore
  don't-care regions. Per-step `matchMode` = `robust` / `template` / `feature`.
- **Also**: pixel-color checks, optional PaddleOCR text find / read-to-variable.
- **Smart wait**: `wait_stable` waits until the screen (or an ROI) stops
  changing — replaces guessed `sleep`s (fast when ready, patient when slow).
- **~30+ step types**: click image/text/position, click-all, relative/offset
  clicks, wait / random / wait-stable, drag / long-press / pinch / scroll,
  key / type / hotkey, loop / goto / while / do-until, if image/text/color/
  count/var, set-var, read-text→variable, HTTP request, run-Python-script,
  call sub-task, groups — with retry / repeat / until policies.

## Authoring (desktop GUI)

Drag-and-drop **node flow graph** and an interoperable **step list** with a full
per-step dialog; an action **recorder** (global hooks), snippet library, task
packages (`.zip` with templates), on-preview coordinate/color picking, template
crop, single-step test run; global hotkeys (F6 run/stop, ESC stop), scheduler,
and an image/color **monitor/trigger** with tray icon; a **Test** tab to load and
run visual test suites.

## Visual test framework (`autoclicker.testkit`)

Turn automation into tests:

- **Assertions**: image / text / color present-or-absent, variable comparison.
- **Visual regression**: baseline diff (first run captures the baseline; later
  runs flag changed-pixel ratio and emit a baseline|actual|heatmap image).
- **Cases & suites**: declarative JSON suites *or* pytest fixtures (`screen`,
  `visual`); **data-driven** cases (a data table / CSV runs the case per row).
- **Reports**: self-contained **HTML** (embedded screenshots + per-step
  timeline, optional GIF) and **JUnit XML** for CI; retries mark **flaky**.

```python
# pytest style
def test_login(screen, visual):
    screen.assert_image("assets/login_btn.png")
    screen.assert_text("Username")
    visual.check("login.png", tolerance=0.02)
```

## Web console (`autoclicker-web`)

Browser UI to trigger suites (single or batched), watch **live per-line logs**
and per-case results, schedule recurring runs, list ADB devices and grab
**screenshots**, browse **persisted run history**, and open the HTML report — all
served by FastAPI with a zero-build vanilla-JS front end.

## Notes

- Host is **Windows** (Win32 capture + `SendInput`); ADB targets are
  cross-platform via the `adb` CLI (must be on `PATH`).
- OCR's first run downloads PaddleOCR models (~100 MB).
- Some target windows may require running as administrator.

## License

MIT
