本文共 1589 字,大约阅读时间需要 5 分钟。
??Airtest??
??????????????????????????????????????Airtest???UI???????????????????????????Airtest???????????
??????????
?????????????????????????????????????????????????????????????????????????????
??Airtest???
??????UI??????????Airtest??????? 1. **??????**?????????????????????????????????????? 2. **????**??????????????????????????????????? 3. **????**?AirtestIDE???????????????????????????????????
??????
AirtestIDE?????????????????????????????? 1. ??Airtest???http://airtest.netease.com/???????Airtest??? 2. ????? - ????????????USB??? - Airtest??ADB???????????????????`adb devices`?????? 3. ??AirtestIDE??????????????
????????
?????????????????? - **??**?????????????? - **????**???`touch`?????????`sleep`??????? - **??**???`assert_exists`?????????`keyevent`???????
????????????
??????????????debug???????????????????????????? - debugmm.qq.com/?forcex5=true - debugtbs.qq.com - debugx5.qq.com?????????
????Python??Airtest??
Airtest????Python???????Python 3.5??????????????? 1. ??Python???????? 2. ??pip?????? ```bash pip install airtest pip install pocoui ``` 3. ??PyCharm????????????
??????????
from airtest.core.api import * # ???? connect_device("Android:///") # ???? start_app("com.pingan.certicationApp") # ?????? touch(Template("image_of_a_button.png")) # ???? swipe(Template("slide_start.png"), Template("slide_end.png")) # ?? assert_exists(Template("success.png")) # ????Home??? keyevent("BACK") home() # ???? uninstall("package_name_of_your_apk") ????????
??AllReportStartCMD.py???????????????????????????Jenkins??????????????????
??
????????????????????????????
转载地址:http://yyik.baihongyu.com/