Package: metisse
MetisseMetisse is a powerful image recognition and automation package designed to facilitate the development of scripts for mobile devices. It provides an extensive set of tools for image recognition, screenshot manipulation, and user interaction, such as tapping, swiping, and pressing.FeaturesImage recognition using template matchingScreenshot manipulation, including cropping and savingAutomation of user interactions, such as tapping, swiping, and pressingCustomizable parameters for image recognition and automation tasksEasy integration with existing automation frameworksInstallationTo install Metisse, run the following command in your terminal:pipinstallmetisseAdditional RequirementsAndroid DevicesEnable Developer Mode on your Android device.Turn on USB Debugging (adb) on your Android device.Install Android Debug Bridge (adb) on your computer.Add adb to your system path.iOS DevicesInstall Appium/WebDriverAgent on your ios device.Enabling Developer Mode and USB Debugging (adb) on Android DevicesFollow these steps to enable Developer Mode and USB Debugging on your Android device:Open the Settings app on your Android device.Scroll down and tap "About phone" or "About device."Find the "Build number" or "Software version" and tap it 7 times. You will see a message that you are now a developer.Go back to the main Settings menu and tap "Developer options" (it should be visible now).Enable "USB Debugging."Android Debug Bridge (adb) Installation and ConfigurationFollow these steps to install and configure adb:Download the Android SDK Platform Tools from the following link:https://developer.android.com/studio/releases/platform-toolsExtract the downloaded zip file to a location of your choice.Add the extracted folder to your system's PATH variable.UsageHere's a simple example demonstrating how to use Metisse for image recognition and user interaction:python
Copy codefrommetisse.metisseimportMetisseClass
frommetisse.paramsimportImageRecognitionParams,SaveParams

classscript_example(MetisseClass):def__init__(self,device_id="",relatively_path="",pyqt6_ui_label={},os_environment=""):MetisseClass.__init__(self,device_id=device_id,relatively_path=relatively_path,pyqt6_ui_label=pyqt6_ui_label,os_environment=os_environment,)def__call__(self,*args,**kwargs):# Your custom script implementation goes hereif__name__=="__main__":script_obj=script_example("01234567(test_uid)",None,None,"android")script_obj()Here's a function designed to generate a sample project. After running the code, it will create a sample project in the current directory, including a simple script, a device name folder automatically generated after simulating a connection to a device, an icon folder (containing test examples), and a default script GUI (which requires connection to a device to use).frommetisse.metisseimportMetisseClass
importmetisse.example.generate_exampleasexif__name__=='__main__':ex.create_example_py_file()This is a script structure diagram.yourproject
│script_example.py
│
├───ui
├───icon
│└───script_example
└───01234567(test_uid)├───backup├───log├───storage│└───script_example└───temp_imageFor more detailed information about the available methods and their usage, please refer to the MetisseClass Methods documentation.
You can also use this tool for rapid development of automation scripts:AndroidScreenCaptureTool.ContributingWe welcome contributions to Metisse! If you'd like to contribute, please follow these steps:Fork the repositoryCreate a new branch for your changesMake your changes and test them thoroughlyCommit your changes and push them to your forked repositoryCreate a pull request with a detailed description of your changesPlease make sure to follow the code style and conventions used in the project.LicenseMetisse is licensed under the Apache License 2.0.