Changelog
v0.5.0
Two changes alter behaviour you may rely on.
locate() returns CSS pixels now, not raw screenshot pixels. Identical on a standard-DPI screen. If you were correcting for the HiDPI offset yourself, remove that workaround.
Elements that only ever matched through the old CCORR fallback will now report as not found. That is correct: they were never really being matched, and clicks were landing wherever the false match happened to sit. Run match_score() on anything that stops being located. Below about 0.4 means it was never there.
Fixed:
- Coordinates are scaled from screenshot pixels into the driver's space, so
click()andfill()land on the element on a HiDPI display instead of missing by the device pixel ratio. Also fixes Appium on iOS, where taps use points click()no longer fires every handler twice. It dispatched a syntheticclickevent and called native.click(), so one call double-submitted forms- Removed the
TM_CCORR_NORMEDfallback in matching. It does not subtract the mean, so it scored 0.93-0.99 on almost any pair of images and returned confident coordinates for elements that were not on screen - Solid-colour templates are rejected. The matching maths is
0/0for these and OpenCV resolves that to a perfect score everywhere, so they matched at (0, 0) against anything swipe_app()works again. It was built onTouchAction, removed in Appium-Python-Client 3.0, so it returnedFalseon every supported client. Rewritten on W3C Actionsfrom pyxelator import swipe_appworks. Its own docstring documented that import, but the function was never exported- Appium failures report the cause instead of a bare
False - An undecodable screenshot returns
Noneinstead of crashing
New Features:
- Multi-scale matching - a template captured at one window size now matches from 0.66x to 1.54x, plus exact 0.5x/2.0x for a device pixel ratio change. Previously a 4% difference was enough to fail. Matches at the captured size short-circuit, so successful lookups cost nothing extra
match_score()- reports how close a template came, for picking aconfidencevalue instead of guessing- Failure messages that diagnose - they report the actual score and tailor the advice to it, so a near miss and an absent element no longer get the same answer
Match.scalereports which size a template matched atswipe_app()takesdurationanddebug, validates its direction, and clamps to the screengrayscale=Falsegenuinely matches on colour; it previously converted to grayscale anyway, making the flag a no-op- Unit test suite - 141 tests, no browser or device needed
Documentation:
ERROR_HANDLING_GUIDE.mdrewritten against the current messages, and now shipped with the packageSTRUCTURE.mdrewritten; it described the layout from before the package split
v0.4.0
New Features:
- Comprehensive error handling for all adapters (Selenium, Playwright, Appium)
- File validation - checks if template image exists before processing
- Clickability detection - validates element is clickable before clicking (Selenium & Playwright)
- Fillability detection - validates element is fillable before filling text (Selenium & Playwright)
- Debug mode - detailed logging with
debug=Trueparameter for troubleshooting - Retry mechanism - configurable retry attempts for Selenium & Playwright (default: 3 retries)
- React compatibility - proper event handling for React form inputs
Improvements:
- Clear, actionable error messages with troubleshooting tips
- Smart element detection - finds clickable/fillable parent elements
Documentation:
- Complete error handling guide (ERROR_HANDLING_GUIDE.md)
- Updated implementation status for all adapters
v0.3.1
- Beta: Appium support for mobile automation
- W3C Actions API integration for mobile gestures
- Enhanced template matching algorithm
- Bug fixes and stability improvements
v0.2.x
- Playwright support improvements
- Enhanced error handling
v0.1.0 (Initial Release)
- Selenium support
- Playwright support
- Auto framework detection
- Simple function API
- OOP class API
- Template matching with OpenCV
- Click, fill, find, locate actions
