Hello everyone, I’m IT sharer, also known as Pipi. This article mainly to share the mobile phone automation test IDE —– Airtest installation and IDE control details related knowledge, let’s have a look.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

preface

The front xiaobian with you explained some modules used to do automation, but if it is on the phone to do automation, can we still do it? Perhaps some people feel that it is difficult to capture the data packet of the phone, but also what automation, and certainly not easy. But I have to tell you that this is all done by an automated testing software called Airtest. You just have to keep it running and do everything on your phone.

Install the IDE

Here you need to download our Airtest.

https://u062.com/file/7715018-451404671
Copy the code

After downloading it, we need to install it, and then open it for the first time, we need to register an account, which must be a netease account. Since this IDE is developed by netease, we need to log in to the email number of netease before we can use it. After the installation is successful, as shown in the figure:

Two, IDE control details

1.Airtest auxiliary window

This is where all the functions of Airtest are displayed, as well as the functions of Poco, which is a more recognization-friendly control than Airtest. As shown in figure:

Exists to check whether a specified target exists on the screen. Test: Enter text on the target program. Keyevent: press the key to swipe the snapshot: Sleep timing Assert_EXISTS: specifies the target for which assertions exist. Assert_not_exists: specifies the target for which assertions do not exist. Assert_equal: specifies whether two values are equalCopy the code

2.Poco auxiliary window

Poco is mainly used for game assist testing, such as auto-click plugins and so on.

I won’t go into detail here, because the one we use most is Airtest.

3. Script editing window

This window is used to build and run our program, and also supports automatic code generation.

4. The Log view window

This window prints the log generated by each step of our operation in this window for us to check. By checking the log, we can know the cause of the program error and the result generated by the current operation.

5. Mobile device connection

We can see that the IDE shows a mobile device connection, Serial NO. State indicates the Device status. There are three types: offine(the Device is disconnected or not responding), Device(the Device is connected), and No Device(No Device). Refreshing ADB naturally resets the current device list, and restarting ADB naturally disconnects all connections and resets the list.

6. Connect the remote device

You can connect to a device on your local emulator or to a remote device, as long as you have something to connect to.

7. Connect to Windows

Used to select current system desktop applications and record their current behavior, can also be used for automation.

8. Connect to aN IOS device

Not to mention, it’s for the iPhone.

9. Google Docs

This function is quite good, it is very convenient to view the method of the device, and can perform some simple operations, as follows:

Third, summary

This article mainly introduces the automatic test IDE —– Airtest installation and IDE control basics, the next article will take you to the actual application of Airtest connected to the mobile phone, to share some fun.