When our appium and Python environments are configured, how do we start our first app? Here are the steps to start the app Appium+python, and we'll use the night watchman Simulator for a detailed view.
Test Project: QQ
Test tools: Appium, Pycharm, night watchman simulator
Operation Description:
The first step: Open our night watchman Simulator and then run it on our computer (WIN+R) and enter our cmd. Now is the first to confirm whether our device is connected to the computer, the real-computer connection method is also
Input: ADB devices
A: If the following action is displayed, the current device connection is successful
B: If the connection fails, you can enter it first: ADB connect 127.0.0.1:62001 (Night Watchman Simulator connection method)
C: If the connection fails, first restart the Android emulator or the real machine
D: The real machine connection first to see if there will be conflicts with other software, such as: 91 assistants, etc., you can first turn off the other software and then connect
Step Two: Install our app in the directory and get information about our current app (here's the first method, which I personally prefer)
Currently my qq.apk is placed in (D:\android\android-sdk-windows\tools file), storage location you can customize
Below we get the app's package name
Continue to open our run (win+r) input cmd and enter: AAPT dump badging your app's location \xx.apk
Get the package name for qq.apk
QQ Package Name: COM.TENCENT.MOBILEQQ
Get the value of QQ launcheractivity
Value of QQ launcheractivity: com.tencent.mobileqq.activity.SplashActivity
The second step: You can also directly put qq.apk into our appium, inside can see the details (here is the second method)
Open our Appium, select the Android robot icon, throw the app you want to test into the file, Appium will show all the information you currently want to test the app
Step three: Write our test script, open our pycharm, create a new. py file
(See following: Appium+python launch App (ii))
Appium+python launch App (i)