当前位置:网站首页>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 .
边栏推荐
- 发送数据1010_1发人员通过 字节的
- ACM warm-up Exercise 4 in 2022 summer vacation (summary)
- 训练赛《眼不见,心不烦,理不乱》题解
- C language classic exercises (2) - "bubble sort"“
- Preliminary exploration of Flink principle and flow batch integration API (II) V2
- 三菱转以太网模块远创智控YC8000-FX 连接 MCGS操作方法
- Svg image color modification is not fancy
- 硬件知识3--IIC协议
- Experiment 6 MPEG
- flask框架中页面跳转与重定向
猜你喜欢

MySQL message queue list structure

Function application of 4G transmission module

D2DEngine食用教程(3)———将渲染目标导出为图像文件

Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

An in-depth explanation of CAS is necessary for interview practice

PAT甲级 1040 Longest Symmetric String

swagger2的初步使用

Summary of Zhang Yu's 30 lectures on Advanced Mathematics

I wrote code for openharmony, and the second phase of "code" pioneer officially opened!

The local picture cannot be displayed after the uniapp H5 is packaged
随机推荐
Pyth去初始化平均在很多机器学决策边界,始向总线上
svg图片颜色的修改 没有花里胡哨
Batch visual target detection callout box -- Yolo format dataset
训练赛《眼不见,心不烦,理不乱》题解
PyTorch生态简介
(5) Digital electricity formula simplification method
PAT甲级 1043 Is It a Binary Search Tree
The local picture cannot be displayed after the uniapp H5 is packaged
Machine learning notes - image homography estimation based on deep learning (homographynet)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Solution to the problem of "out of sight, out of mind, out of order" in the training competition
How to protect JDBC applications from SQL injection
Advanced embedded application of uni app [day14]
Matlab ode45 solving differential equations
Redis transaction learning
Technical dry goods | evaluation index based on mindspire detailed perflexity language model
SqlServer 备份还原
Successfully solved: error: SRC refspec master doors not match any
Native JS realizes the acquisition and operation of DOM
MySQL message queue list structure