AirTest & UIAutomation
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 uiautomation in detail. Assuming you have gone through all the setup instruction. Now we’ll be able to put them all together to achieve automation windows apps using OCR.
Integrate with UIAutomation
Start application under test:
Copy to Clipboard
Overwrite findelement function to support image recognition and return ImageElement:
Copy to Clipboard
Finnally achieve the operations under ImageElement class:
Copy to Clipboard
After framework encapsulation, write the test script:
Copy to Clipboard