testsAndMisc/meta/requirements.txt
Krzysztof kuhy Rudnicki b73811c233
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Add android_ui: drive Android apps by element, never by coordinates
Shared across every repo with an Android surface (screen-locker's workout_app,
todo, dufs-cloud/app). Works against a plain release APK on a physical device
over adb — no root, no emulator, no Flutter debug connection, no app changes.

Driving an app by tapping pixel positions read off a screenshot fails in ways
that look like success. All observed in one session (2026-08-10) verifying
workout_app's Firebase restore:

* A tap aimed at a password field landed with the field unfocused. The typed
  password went nowhere and NOTHING errored — the next screenshot just showed
  an empty box. type_into/type_into_field now re-read the field and raise.
* Opening the soft keyboard moved a field from y=1572 to y=1319, so a
  coordinate captured one step earlier was already wrong. Every action
  re-resolves the element immediately before acting.
* A widget behind the keyboard reports its LAID-OUT position (1549) not its
  real one (1939) — a 390px error that taps a letter key and reports success.
  keyboard_is_up() distinguishes "absent" from "behind the keyboard", and tap
  closes the keyboard first.
* KEYCODE_BACK is a route pop in Flutter, not a keyboard dismiss: it navigated
  out of Settings and discarded typed credentials, twice. dismiss_keyboard
  tries ESCAPE then BACK and verifies via dumpsys input_method.
* `input text` inserts at the cursor, so typing over a filled field produced
  "canary@example.com321krzychu@gmail.com". Fields are cleared first.
* uiautomator returns ONLY the focused EditText nodes while a Flutter text
  field has focus, and stays that way across retries — so a naive retry loop
  never converges. Partial trees are retried and the best result kept.
* An EMPTY EditText has no text, content-desc or resource-id, so a
  "must be labelled" filter drops the very field you need to fill in. Editable
  nodes are kept regardless and addressable by position.

Ambiguity is an error rather than a silent first-match: `tap "Back"` correctly
refuses when "OFFLINE BACKUP" is also on screen.

Its own test suite caught a real bug in _escape: backslash sat inside the
escape loop, so "&" became "\\&" and a password containing shell
metacharacters would have been typed wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JupKvZCNKRmEeRQY3G1unG
2026-08-10 17:01:28 +02:00

87 lines
1.9 KiB
Plaintext

# ==============================================================================
# testsAndMisc — combined runtime + development dependencies
# Install with: pip install -r meta/requirements.txt
# Sorted alphabetically (enforced by pre-commit `requirements-txt-fixer`).
# ==============================================================================
add-trailing-comma>=3.1.0
aiohttp>=3.9
anthropic>=0.25.0
autoflake>=2.2.0
autopep8>=2.0.0
bandit>=1.7.0
beautifulsoup4>=4.0
berserk>=0.13
black>=24.0.0
bottle>=0.12
codespell>=2.2.0
coverage>=7.4.0
darglint>=1.8.0
dead>=1.5.0
defusedxml>=0.7.1
docformatter>=1.7.0
fixit>=2.1.0
flake8>=7.0.0
flake8-annotations>=3.0.0
flake8-bandit>=4.1.0
flake8-bugbear>=24.0.0
flake8-comprehensions>=3.14.0
flake8-docstrings>=1.7.0
flake8-eradicate>=1.5.0
flake8-pie>=0.16.0
flake8-print>=5.0.0
flake8-pyi>=24.0.0
flake8-pytest-style>=2.0.0
flake8-return>=1.2.0
flake8-simplify>=0.21.0
gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.1.0#subdirectory=gatelock
genanki>=0.13
geopandas>=1.0
howlongtobeatpy>=1.0
hypothesis>=6.98.0
importlib-metadata>=7.0.0
interrogate>=1.5.0
isort>=5.13.0
lxml>=5.0
markdownify>=1.2.0
matplotlib>=3.0
mccabe>=0.7.0
mitmproxy>=10.0
mypy>=1.8.0
numpy>=1.20
opencv-python>=4.0
pillow>=10.0
pip-audit>=2.6.0
pipdeptree>=2.14.0
pre-commit>=3.6.0
prospector>=1.10.0
pycodestyle>=2.11.0
pydocstyle>=6.3.0
pyflakes>=3.2.0
pygame>=2.0
pylint>=3.0.0
pyright>=1.1.350
pytest>=8.0.0
pytest-cov>=4.1.0
pytest-randomly>=3.15.0
pytest-sugar>=1.0.0
pytest-timeout>=2.2.0
pytest-xdist>=3.5.0
python-chess>=1.999
python-kasa>=0.7
pyupgrade>=3.15.0
radon>=6.0.0
reorder-python-imports>=3.12.0
requests>=2.0
rich>=13.0
ruff>=0.8.0
safety>=2.3.0
selenium>=4.0
typer>=0.12.0
types-python-dateutil>=2.8.0
types-PyYAML>=6.0.0
types-requests>=2.31.0
types-setuptools>=69.0.0
typing_extensions # Self annotation on py310 target (session_autopsy store lock)
websockets>=13.0