Airtest daily use summary (1)

1. Troubleshooting that some controls do not work

    During use, some controls (such as touch) may not work, that is, the console does not report an error when running, but the corresponding action is not executed. At this time, there are mainly the following solutions:

1)查看执行日志,执行日志中会展示真正的动作点击或者执行情况。2)如果第一步也是符合预期,可以参考官方给出的建议,升级到最新版本,可能刚好解决了这类bug。3)如果以上两步都不可行,中奖概率会大一些,此时可以考虑换一种实现方式或者重新截取更清晰的图片。

2. Switch implementation

    In airtest, for each action, two processing methods of pictures and coordinates are basically realized. Both of these methods can generally achieve the goal. However, the search of actions based on image matching often faces some matching failures:

    1) The matching failed. Due to the change of the background of each page, it may be necessary to re-intercept for the same control on different pages.

    2) The matching failed, and other similar areas were matched

    3) The matching is successful, but the control does not take effect

    Solution : Switch to the form of coordinates to perform corresponding actions.

3. airtest compatibility issue

    Generally speaking, after the mobile phone is connected, the actions and display on the mobile phone should be the same as those on the Airtest IDE, but there are exceptions: in the IDE, some light-colored floating windows may not be displayed. For example, when the screen recording software that comes with the vivo (nex) mobile phone is running, the corresponding screen recording button and time are not displayed on the IDE screen. If you need to automate similar functions, you need to adopt other methods.

Welcome to pay attention to my public account [ Test Development Memorandum], exchange test related ~ 

Guess you like

Origin blog.csdn.net/hashsabr/article/details/131047975