appium连接android真机错误提示
来源:1-6 appium启动代码配置讲解

qq_王超_8
2019-03-14
买了教程后,有点小崩溃了,哈哈。
教程一开始用的是模拟环境,我用的是安卓手机。
在启动appium的时候,需要几个配置参数。老师用的是平台名称、设备名称、和app的安装路径。我用的是平台名称、设备名称、appPAckage、appActivity。
我输入后面四个参数手机能正常连上appium
所以我在编写代码时,直接复制了四个参数。
可是。。。一编译就一堆报错。
我想确认事情:
我能用那四个参数来启动appium吗(apk路径的方法我搞了好几次,都显示错误运行不了appium)我都下了x-plore看到了手机端的路径
老师方便的后,以后可以加入真机的详细配置操作
我终于用源代码把安卓真机端的app运行起来了。一个礼拜填了好多坑,也学到了很多。代码看上去没啥区别,可能一个空格、一个断码模式就能引发nd的问题。sublime和pycharm 我以前一窍不通,一个礼拜下来,感觉pycharm更适合新手,里面的代码检查可以帮助新人查到代码的根本原因。我会继续加油的。
5回答
-
Mushishi
2019-03-15
platformName 'e6866ad3' 这个千万不能错。appium 或者你不配置
022019-03-19 -
Mushishi
2019-03-15
/哥 ,
这个无论模拟器还是真机都是医院得,平台,永远都是appium 还有uiautomator2 当然4.4以前另外说。这个不变。deviceName是我们adb devices获取道德,这个你为啥这么写呢。waitactivity先别配置。按照教程一步一步走。后面会有无法启动真机德教程
00 -
qq_王超_8
提问者
2019-03-14
又发现个问题,platformName和devicesName的参数搞反了,改过来依旧不能允许成功,继续
00 -
qq_王超_8
提问者
2019-03-14
不行,我还是搞不定,还请老师帮忙解惑
E:\新建文件夹\python.exe E:/untitled/AppiumPython/case/start_appium.py
Traceback (most recent call last):
File "E:/untitled/AppiumPython/case/start_appium.py", line 7, in <module>
webdriver.Remote("http://127.0.0.1:4723/wd/hub",capabilities)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\appium\webdriver\webdriver.py", line 129, in __init__
proxy
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\appium\webdriver\webdriver.py", line 204, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for platformName 'e6866ad3'. Please check your desired capabilities.
Process finished with exit code 1
00 -
qq_王超_8
提问者
2019-03-14
E:\新建文件夹\python.exe E:/untitled/AppiumPython/case/start_appium.py
Traceback (most recent call last):
File "E:/untitled/AppiumPython/case/start_appium.py", line 7, in <module>
webdriver.Remote("http://127.0.0.1:4723/wd/hub",capabilities)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\appium\webdriver\webdriver.py", line 129, in __init__
proxy
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\appium\webdriver\webdriver.py", line 204, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\wangchao\AppData\Roaming\Python\Python37\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for platformName 'e6866ad3'. Please check your desired capabilities.
Process finished with exit code 1
012019-03-14
相似问题