当前位置:网站首页>About selenium common. exceptions. Webdriverexception: message: an unknown server side error solution (resolved)
About selenium common. exceptions. Webdriverexception: message: an unknown server side error solution (resolved)
2022-06-26 15:04:00 【Full stack husky】

Wanyeji |
---|
Faint thunder , Cloudy sky . |
But I hope the wind and rain will come , I can keep you here . |
Preface :
Author's brief introduction : Husky who yearns for power , You can call me Siberian Husky , One devoted to TFS - The whole stack Empowered bloggers
CSDN Blog expert certification 、 Nova plan Season 3 full stack track top_1 、 Huawei cloud sharing expert 、 Alibaba cloud expert Blogger
If there is something wrong with the knowledge of the article , Please correct me. ! Learn with you , Progress together
The motto of life : Being superior to some other man , Is not high , The true nobility is to be superior to one's former self .
If you feel the blogger's article is good , Please pay attention. 、 give the thumbs-up 、 Collect three companies to support bloggers
Column series ( Click unlock ) Learning route guidance Knowledge orientation Python Full stack white paper Zero foundation beginner level chapter Easy to get started in an easy to understand way , Let you fall in love with Python The charm of . Advanced Grammar Mainly around multi-threaded programming 、 Regular expression learning 、 Including project exercises close to actual combat . Office automation Realize the automatic operation of daily office software , Save time 、 Improve office efficiency . Automation test practice From the perspective of actual combat , One step ahead , Rapid transformation test development engineer . Database development practice Updating Introduction and practice of reptile Updating Data analysis Updating Introduction to the front +flask Full stack Updating django+vue Full stack Updating expand - Introduction to artificial intelligence Updating The road to network security Stepping on a pit Record the pit encountered during learning and drilling , It is convenient for those who come from behind to catch up Net security literacy Three days fishing , No deep understanding of the principle , It will only make you a script boy . vulhub The loopholes in the shooting range reappear Make it easy to reproduce vulnerabilities , Let security researchers focus more on the vulnerability principle itself . shell Programming Don't involve linux Basics , The final case will be in the direction of safety reinforcement . [ To be finished ] WEB Vulnerability attack and defense 2021 year 9 month 3 Stop updating on , Move to safe communities such as prophet community and small secret circles Collection of penetration tools 2021 year 9 month 3 Stop updating on , Move to safe communities such as prophet community and small secret circles A little Engineer Test artifact - Charles Software test data packet capture analysis artifact Test artifact - Fiddler Learn to fiddle , Learn not to stand upside down and eat , Rarefied ! Test artifact - Jmeter Not just a performance test artifact , It can also be used to build a lightweight interface automation testing framework . RobotFrameWork Python Automatic test tool realized , This chapter only introduces UI Automation part . Java Realization UI automation Document written in 2016 year ,Java Realized UI automation , It still has reference significance . MonkeyRunner There are not many application scenarios for this tool at present , The document has been deleted , Only for the sake of good typesetting .

List of articles
If you click in, you must first carefully check whether your error reporting details are consistent with those of the blogger , The “WebDriverException” Many exception types , Please carefully check whether the error information in this article is consistent with yours .
Example script with errors
# coding=utf-8
from time import sleep
from appium import webdriver # appium The feature of Android is that Android 、IOS The bottom layer of is encapsulated into webdriver Type statements
# from appium.webdriver.common import appiumby
''' The difference in WEB automation ,APP Automation requires a concept of equipment ; The so-called equipment concept , Is the start parameter '''
# Launch parameters
desired_caps = {
} # Definition desired_caps Variable , Used to assign a lot of startup information
desired_caps['platformName'] = 'Android' # Equipment name 、 System is "Android"
desired_caps['platformVersion'] = '4.4.2' # Here is the setup center of the night God simulator to view the Android version "7.1.2" , Later, I will tell you how to switch versions
desired_caps['deviceName'] = '127.0.0.1::62001' # If it is a real machine, fill in the equipment name ; Because we use simulators , Fill in IP Port number
desired_caps['appPackage'] = 'com.android.contacts' # APP The package name ; Here we use the address book
desired_caps['appActivity'] = '.activities.PeopleActivity' # The name of the launched interface ( Or the startup name , The default is "." At the beginning )
desired_caps['automationName']='UiAutomator1'
# Declare the mobile driver
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) # Register to this node , Pass in "desired_caps". This node is "appium" Open port node
# Navigate to the contact you want to work on
driver.find_element_by_id('com.android.contacts:id/cliv_name_textview').click() # Here is the demonstration effect , First write . Later, I will tell you how to locate this id
sleep(3)
driver.quit()
Preface
Doing it APPIUM Of APP The following two error messages appear during the automated case demonstration :
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 4.4.2. The following are available: 127.0.0.1:62001 (7.1.2)

appium
The contents of the error report are as follows :
Encountered internal error running command: Error: Unable to find an active device or emulator with OS 4.4.2. The following are available: 127.0.0.1:62001 (7.1.2)

Abnormal analysis
In fact, there is nothing to analyze , The prompt message has already told you . It is the default device information we have passed in “ Android version ” Not caused by , We introduced The Android version is 4.4.2
, But in fact “ Night God Simulator ” The current default version of is “7.1.2”.
PS: I wrote this script before , At that time “ Night God Simulator ” The default version of is “4.4.2”, The error message tells us that the current Android version of the device is “7.1.2”


边栏推荐
- Mark: unity3d cannot select resources in the inspector, that is, project locking
- Datasets dataset class (2)
- 信息学奥赛一本通 1405:质数的和与积 (思维题)
- Get the intersection union difference set of two dataframes
- R language uses GLM function to build Poisson logarithm linear regression model, processes three-dimensional contingency table data to build saturation model, uses step function to realize stepwise re
- How to mount cloud disks in ECS
- 同花顺注册开户安全吗,有没有什么风险?
- Login authentication service
- 国信证券的排名如何?办理股票开户安全吗?
- 集群中命令的执行过程
猜你喜欢
Where do people get their top energy?
Use abp Zero builds a third-party login module (II): server development
使用 Abp.Zero 搭建第三方登录模块(二):服务端开发
VMware partial settings
人的顶级能量从哪里获取?
Unity 利用Skybox Panoramic着色器制作全景图预览有条缝隙问题解决办法
MySQL master-slave replication and read-write separation
Login authentication service
TCP拥塞控制详解 | 1. 概述
Talk about the RPA direction planning: stick to simple and valuable things for a long time
随机推荐
Mark: unity3d cannot select resources in the inspector, that is, project locking
The heavyweight white paper was released. Huawei continues to lead the new model of smart park construction in the future
Pytorch深度学习代码技巧
赠书 | 《认知控制》:我们的大脑如何完成任务?
VMware partial settings
R语言使用ggplot2可视化泊松回归模型(Poisson Regression)的结果、可视化不同参量组合下的计数结果
信息学奥赛一本通 1400:统计单词数 (字符串匹配)
MHA high availability coordination and failover
Unity C# 网络学习(十)——UnityWebRequest(二)
Complimentary Book Cognitive Control: how does our brain accomplish tasks?
TS common data types summary
JVM 输出 GC 日志导致 JVM 卡住,我 TM 人傻了
券商经理给的开户链接安全吗?找谁可以开户啊?
[cloud native] codeless IVX editor programmable by "everyone"
Is it safe for flush to register and open an account? Is there any risk?
Redis事务与watch指令
Halcon C# 设置窗体字体,自适应显示图片
人的顶级能量从哪里获取?
R语言dplyr包bind_rows函数把两个dataframe数据的行纵向(竖直)合并起来、最终行数为原来两个dataframe行数的加和(Combine Data Frames)
Pytoch deep learning code skills