Start Appium and emulator in Windows

1. Start Appium

After installation, find Appium on the desktop or menu, and double-click or click to open Appium.exe respectively. If everything is normal, an interface window after Appium is started will appear, as shown in the following figure.

1.1 Android Settings

Click the first robot icon in the upper left corner to pop up the Android Settings window, as shown in the following figure.

In this window, you can set the Android application to be tested, because we will write a script to run the test next, so you can not set it at all and keep its default value. If it is not set in the script, it needs to be set here, but most of them can be kept at the default value. There are mainly 5 settings that need to be set:

1. Application Path: After clicking the Choose button, the path selection box for selecting Android applications will pop up, and you can select the application to be tested.

2.Launch AVD: If there are multiple emulators, choose one as the emulator for testing.

3.Platform Name: Of course, choose Android, because now we are talking about automated testing of Android.

4. Automation Name: Of course choose Appium, aren't we playing Appium?

5.PlatformVersion: Of course, choose the same version as in the simulator.

1.2 General Settings

Click the second gear icon in the upper left corner of Appium to pop up the General Settings window, as shown below.

If Appium is installed on this machine, you can keep the default value. If Appium is installed on another machine, you need to set the Server Address. The value is the IP address of the machine where Appium is located, and the port number generally does not need to be changed.

1.3 Start Appium

This time I run Appium directly, so make relevant settings and click the square icon in the upper right corner of Appium to start Appium. If you can see the information shown in the figure below, it means that the startup is successful.

2. Start the emulator

2.1 Start the Virtual Device Manager

Go to the ANDROID_HOME\sdk directory, and then double-click the AVD Manager.exe file. If there is no such file, you can double-click the SDK Manager.exe file, then click the menu Tools in the opened window, and then click its Manage AVDs,,, submenu item, which opens the Android Virtual Device(AVD) Manager, as shown in the following figure. This is the Android Virtual Device Manager, with which we can create, edit and launch specific emulators.

 

2.2 Creating and editing simulators

Click the Create button to create a new emulator, which will open a window to create a new emulator, as shown in the image below.

Enter or select the parameters of the required simulator in this window. It should be noted here that Target should select the same parameters as Appium or the script, Device should select the corresponding Target, and ensure that the value of CPU/ABI cannot be Empty, the RAM in Memory Options should not be set too large, I usually set it to 256 or 512, VM Heamp is set to 64, and other options can be kept at their default values. Finally, click the OK button at the bottom to complete the creation. After the creation is successful, it will appear in the list. Select this item to perform editing operations, which are similar to creation, and will not be repeated here.

2.3 Start the emulator

Make sure there is no problem. Select the simulator to be started, click the Start button, and click the Launch button directly in the Launch Options dialog box that pops up. The progress bar for starting the simulator will appear, and then the simulator window will appear. The window is dark, that is because the simulator has not been started yet. After waiting for a while, you can take the opportunity to make a cup of tea and see that the startup is successful, as shown in the following figure. It feels completely like an Android phone.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325164252&siteId=291194637