当前位置:网站首页>Avoid mistakes, common appium related problems and Solutions
Avoid mistakes, common appium related problems and Solutions
2022-07-24 03:57:00 【Software testing】
problem 1:
adb No device detected
solve :
1. Check if the mobile phone driver is installed (win10 The system does not need ), Go to the official website to download the mobile phone driver or the computer to download the mobile phone assistant to help install the mobile phone driver , After installation, uninstall the phone assistant ( Prevent access to the mobile phone adb Port interference )
2. Turn on the phone settings , Enter developer options , open USB Debugging function
3. Plug and unplug the phone again USB, Choose to accept debugging , Accept fingerprint verification
problem 2:
adb Installation application prompt permission is not enough
solve : Some Android phone developer options need to be modified USB debugging
problem 3:
Code error : No connected Android device found
solve : Check whether the platform version number is correctly filled in the code
problem 4:
appear class not found such java Stack errors
SWT folder ‘…\lib\location of your Java installation.’ does not exist.Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
such as :
solve : Is basically JDK The correct version is not installed or the configuration of environment variables is confused , The standard environment variable configuration method is as follows 
First of all, these two have to have 
secondly ,jdk Environment variables can be configured here .
problem 5
Some phones have been running once appium Script , The mobile phone has been installed with ui2 drive , But every time you execute, you will still be prompted whether to install UI2, Pictured 
The reason for this problem is , As long as the automation driver is set to UI2 that appium Every time the test script is run, it will be re installed by default UI2 The mobile phone .
To solve this problem, you can refer to the problem 2, Set the relevant permissions , Run it again to see if it will prompt you .
If there is a prompt, you can add another configuration in the configuration item of the code , skip UI2 Installation :
skipServerInstallation Set to True
This configuration item matches with UI2 The use of , In other words, the configuration item specifies automationName by UiAutomator2
Or use appium1.15 Version above can add this configuration .
Be careful : If you don't have UI2 Or you want to install it again , Don't add this configuration item
common problem 6
The running code prompt cannot find ADB, Such as
An unknown server-side error occurred while processing the command. Original error: Could not find ‘adb.exe’ in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
Check ANDROID_HOME Whether the environment variables are configured correctly , Restart after configuration appium and pycharm Command line and other related tools
Can pass appium-desktop Check whether the environment variables are configured correctly , If configured correctly, you can correctly recall the environment variables you configured in the program .
If you have a blank page here , So I suggest you reconfigure , Or just fill in the corresponding path , then save and restart
problem 7
The runtime code reported an error :
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error Command ‘‘C:\Program Files\Java\jdk1.8.0_131\bin\java.exe’ -jar ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-adb\jars\sign.jar’ ‘C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’ --override’ exited with code 1
The main problem is that the certificate signature is wrong , Guess it's the new version appium With the driver installed , And the old version of appium At this time, the two signature certificates are inconsistent, resulting in authentication errors .
The solution is to appium-desktop Replace it with a new one .
Or get into the device - Application management - Search for appium Relevant procedures , Manually unload and execute the script again
Another explanation is to run appium-server You don't have enough authority , Use the administrator to open appium-server Can solve this problem .
problem 8
Error in execution code

This question is not common , The main problem is the mobile phone operating system
The program cannot be opened automatically appiumsettings, So we can manually turn on appiumsettings service ( The program has no interface , There will be the illusion that it will flash back when it is opened , It's normal )
Then run the script
If you find this method troublesome , Then we can only update the system or replace the mobile phone ..
The house needs to be built layer by layer , Knowledge needs to be learned at one point one . We should lay a good foundation in the process of learning , More hands-on practice , Don't talk much , The last dry goods here ! I stayed up late to sort out the stages ( function 、 Interface 、 automation 、 performance 、 Test open ) Skills learning materials + Practical explanation , Very suitable for studying in private , It's much more efficient than self-study , Share with you .
Get off w/x/g/z/h: Software testing tips dao
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
边栏推荐
- C語言經典練習題(2)——“冒泡排序(Bubble Sort)“
- 6-15 vulnerability exploitation SMB rce remote command execution
- Function application of 4G transmission module
- Histone research -- Characteristics and literature references of histones in Worthington calf thymus
- 6-13 vulnerability exploitation -smtp brute force cracking
- [cloud native] get to know kubernetes quickly
- Ros2 common command line tools organize ros2cli
- 三菱转以太网模块远创智控YC8000-FX 连接 MCGS操作方法
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 1 (summary of some topics)
- LAN SDN technology hard core insider 9 from software overlay to hardware overlay
猜你喜欢

Prosci Lag3 antibody: improve in vitro research and help cancer immunotherapy

Hardware knowledge 3 -- IIC protocol

"Wei Lai Cup" 2022 Niuke summer multi school training camp 1 (summary of some topics)

RTOS internal skill cultivation (10) | in depth analysis of RTOS kernel context switching mechanism

Developers share mindspire Lite experience, one click image segmentation

Convert the pseudo array returned by childNodes into a true array

Matlab Simulink hydropower and synchronous motor power generation

MySQL message queue list structure

Database foundation and installation

Matlab Fractional Order PID control
随机推荐
LAN SDN technology hard core insider 10 cloud converged matchmaker evpn
Combinatorial number (number of prime factors of factorials, calculation of combinatorial number)
Y74. Chapter IV Prometheus large factory monitoring system and practice -- Introduction to promql and monitoring pod resources (V)
三菱转以太网模块远创智控YC8000-FX 连接 MCGS操作方法
C语言经典练习题(2)——“冒泡排序(Bubble Sort)“
What is the product and expressiveness of 113700 Xingrui? Come and have a look
Workbnech application of dynamixel steering gear under ROS
训练赛《眼不见,心不烦,理不乱》题解
Page Jump and redirection in flask framework
D2DEngine食用教程(3)———将渲染目标导出为图像文件
Exploration of new mode of code free production
Learning summary | truly record what mindspire two-day training camp can bring to you (1)!
Machine learning notes - image homography estimation based on deep learning (homographynet)
RTOS internal skill cultivation (10) | in depth analysis of RTOS kernel context switching mechanism
PyTorch生态简介
Preliminary exploration of Flink principle and flow batch integration API (II) V2
Worthington purified enzyme preparation helps neonatal cardiomyocyte isolation system
Matlab Fractional Order PID control
LAN SDN hard core technology insider 21 Kang long regrets -- Specifications and restrictions (middle)
The pit trodden by real people tells you to avoid the 10 mistakes often made in automated testing