AirTest & Appium Mac2Driver
It is a cross-platform UI automated testing framework based on image identification. And it is suitable for games and apps, and the supported platforms are Windows, Android and iOS.
In previous articles we have introduced the Airtest library and appium mac2 driver in detail. Assuming you have gone through all the setup instruction. Now we’ll be able to put them all together to achieve automation MacOS apps using OCR.
Integrate with Appium Mac2Driver
Start appium and connect to server:
Get scale of resolution and set size for image recognition:
Overwrite findelement function to support image recognition and return ImageElement:
Finnally achieve the operations under ImageElement class:
After framework encapsulation, write the test script: