AppIum — Start App

  Automated testing is a necessary skill for testers. The so-called automation is to complete manual operations through code. Today I will summarize how to start the app through python

Environmental conditions

1. Install python: download address

2. Install JDK: download address

3. Install Android-SDK: For details, see appium—Android-SDK installation

4. Install appium: For details, see appium—command line to start appium, and the method of installing the client is not unified, the client download link; Note: If the Android version is above 7.0, please install appium version 1.7 or above

5. Install Node.js: download link

6. Install Appium-Python-Client

# Install appium using pip

pip install Appium-Python-Client

Start conditions

To start the app through code, you need to know the package name and launcherActivity of the app< /p>

Method 1:

# View the package name through aapt, Activity
aapt dump badging apk path

aapt is the abbreviation of Android Asset Packaging Tool, a tool for compiling and packaging resources, in the build-tools directory of the SDK. At present, only ppat is used to view the package name and Activity of the apk

share picture

Method 2:

# View by adb command
#
Click the running app to view the log
adb lagcat |find "START"

share picture

Code implementation

1.platformName: Test version (IOS/Android)

< p>2.deviceName: the name of the mobile phone device, viewed through adb devices

3.platformVersion: Android version number

4.appPackage: apk package name

5 .appActivity: launcherActivity of apk

share picture

127.0.0.1:4723/wb/hub: local address + appium port number;appium port number is OK Change

6. Start appium

Open cmd, enter appium start command line

share picture

7. Start the app

After running the code , You will find that the software on the phone is activated

# Install appium using pip

pip install Appium-Python-Client

Method 1:

# View the package name through aapt, Activity
aapt dump badging apk path

aapt is the abbreviation of Android Asset Packaging Tool, a tool for compiling and packaging resources, in the build-tools directory of the SDK. Currently only ppat is used to view the package name and Activity of the apk

Method 2:

# View by adb command
#
Click the running app to view the log
adb lagcat |find "START"

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 593 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.