报错解决:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error
报错代码
from appium import webdriver
from selenium.webdriver.support.ui import WebDriverWaitdesired_caps={}
desired_caps['platformName']='Android'
desired_caps['platformVersion']='7.1.2'
desired_caps['deviceName']='127.0.0.1:21503'desired_caps['app']=r'D:\appium_app\dr.fone3.2.0.apk'
desired_caps['appPackage']='com.wondershare.drfone'
desired_caps['appActivity']='com.wondershare.drfone.ui.activity.WelcomeActivity'# 服务器端口
driver=webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)
driver.implicitly_wait(3)driver.find_element_by_id('com.wondershare.drfone:id/btnBackup').click()WebDriverWait(driver,15).until(lambda x:x.find_element_by_class_name('android.widget.Button'))
driver.find_element_by_class_name('android.widget.Button').click()WebDriverWait(driver,8).until(lambda x:x.find_element_by_android_uiautomator('new UiSelector().text("Refresh")'))
driver.find_element_by_android_uiautomator('new UiSelector().text("Refresh")').click()WebDriverWait(driver,8).until(lambda x:x.find_element_by_class_name('android.webkit.WebView'))
contexts=driver.contexts
print(contexts)driver.switch_to.context('WEBVIEW_com.wondershare.drfone')
driver.find_element_by_id('email').send_keys('shuqing2018@163.com')
driver.find_element_by_class_name('btn_send').click()driver.switch_to.context('NATIVE_APP')
driver.find_element_by_class_name('android.widget.ImageButton').click
错误信息
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome '68.0.3440'. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details
自己的本地 appium server 没有配置 chromedriver.exe
配置 chromedriver.exe
尽量保证模拟器的和PC端的版本一样下载
## 替换或保存chromedriver.exe
默认路径
C:\Users\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win下将下载的chromedrive替换掉原来的即可
我的安装路径
C:\Users\yunao\node_modules\appium-chromedriver\chromedriver\win
报错解决:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error相关推荐
- 【解决报错问题:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurr】
运行Appium报错: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occ ...
- 已解决selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
已解决selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary ...
- 报错:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versio
报错: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versio ...
- 解决selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missin
(Session info: chrome=73.0.3683.103)(Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32 ...
- 关于appium踩坑 selenium.common.exceptions.WebDriverException: Message: An unknown server-side error(已解决)
万叶集
- 使用selenium时遇到的报错selenium.common.exceptions.WebDriverException: Message: Service xxxxstaus:1详解及解决方法详解
在开始之前,分享一下使用selenium常遇到的几个问题和报错: 1.首先就是版本问题的报错:selenium.common.exceptions.NoSuchWindowException: Mes ...
- 已解决selenium.common.exceptions.WebDriverException: Messag: ‘geckodriver‘ executable needs to be in PA
已解决selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in P ...
- 已解决 selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element 找不到元素的问题
场景 使用selenium的find_element_by_xpath()函数报错:selenium.common.exceptions.NoSuchElementException: Message ...
- 已解决selenium.common.exceptions.TimeoutException: Message:
已解决(selenium爬虫报错)selenium.common.exceptions.TimeoutException: Message: 文章目录 报错代码 报错翻译 报错原因 解决方法 千人全栈 ...
最新文章
- angular.foreach 格式
- C语言基础之--scanf函数
- Jmeter(一)http接口添加header和cookie --转载
- cmake 成功后, make 出现 No such file or directory 问题解决
- 【DBMS 数据库管理系统】数据仓库 数据组织 ( 数据组织级别 | 元数据 | 粒度 | 分割 | 数据组织形式 )
- jquery学习手记(3)属性
- 2016谷歌官方最新eclipse工程导入studio,以前方式全部废弃。不能再使用。
- 深入理解事件循环机制
- 小组是什么意思_生猪期货什么时候上市?相关企业如何参与生猪期货
- 碎玻璃:诊断生产Cassandra问题
- java web 保护_java web项目请求控制及简单漏洞防范
- 为应用程序池**提供服务的进程意外终止。进程ID是**。进程退出代码是'0x80'
- 2021年上半年数据库系统工程师下午真题及答案解析
- MATLAB符号运算——极限
- bch verilog代码_(15-7-2)BCH Verilog HDL 语言编写的(15,7,2)BCH编码和译码功能 VHDL-FPGA- 272万源代码下载- www.pudn.com...
- HTML班级网页设计 基于HTML+CSS+JS制作我们的班级网页(web前端学生网页设计作品)
- 苍穹插件常用事件与方法
- 计算机数据库管理技术论文的结论,计算机数据库论文范文.doc
- 2021年7月火影几点服务器维护完,火影忍者手游2021年5月27日更新公告
- Type-C、USB-C、USB3.1 三者关系