Appium找不到设备,重新启动服务器ADB [英] Appium could not find devices, restarting adb server
问题描述
我已经看过双方的网络和计算器上对这个问题,有关于这一主题不少答案,但这些都没有为我工作。
I have looked on both the net and on stackoverflow for this issue, there are quite a few answers on this topic but none of these have worked for me.
当我开始Appium.exe,承载应用程序(APK)路径,包名和活动Appium控制台显示以下错误:
When I start Appium.exe, bearing the application (apk) path, package name and activity the Appium console displays the following error:
错误:错误:无法pre-推出appium:错误:无法找到一个连接的Android设备
ERROR: error: Could not pre-launch appium: Error: Could not find a connected Android device
这是我之前也得到code任何东西。我已经做了,在过去的Android网络驱动器的一些工作,我已经在所有使用命令行android的亚行过去没有问题。
使用命令行,如亚行设备'我可以看到物理设备ID连接以及能够安装和commad提示符启动任何的APK但是却又这不符合appium工作。有没有人经历过这个问题?
This is even before I get to code anything whatsoever. I have done some work with Android Web driver in the past and I have used the android adb from command line in the past with no issues at all. Using command line such as 'adb devices' I can see the physical device id attached as well as being able to install and launch any apks from commad prompt but yet this does not work with appium. Has anyone experienced this issue before?
,我有Android SDK和工具已经安装,所有的环境路径设置,如:
I am using Widows 7, I have Android SDK and tools already installed, all environment paths are set such as:
ANDROID_HOME:C:\\ SDK \\ SDK
路径:C:\\ SDK \\ SDK \\平台工具
ANDROID_HOME: C:\sdk\sdk Path: C:\sdk\sdk\platform-tools
我将在C#中使用硒(如果我得到这个工作,那是)进行编码的应用程序测试。任何帮助将大大AP preciated。
I will be coding app tests in C# using selenium (if I ever get this to work that is). Any help will be much appreciated.
推荐答案
是的,所以Appium最finnicky部分是 desired_capabilities
和 server_arguments
。
Yes, so the most finnicky part of Appium is the desired_capabilities
and server_arguments
.
所以第1步:
- 获取Appium配置,使服务器时没有问题,你就可以开始你的code与它进行交互。
问题:
-
看来你有'prelaunch应用在应用设置中选中,这意味着只要Appium服务器启动时,它会试图建立到手机或仿真器的连接。
It seems that you have 'Prelaunch Application' checked in the App Settings, which means that as soon as the Appium server is started, it will attempt to establish a connection to the phone or emulator.
取消选中。
您打算让您的测试实例化webdriver的会议上,在需要的 desired_capabilties
中的他们本节文档
You're going to have your tests instantiate the WebDriver session, with the needed desired_capabilties
as defined in this section of their documentation
这将有助于你得到它有点工作。
This should help you get it somewhat working.
我会建议在命令行中运行Appium,让你有过什么事情最多的控制。 (如果那是一个可行的选择)
I would suggest running Appium from the command line, so you have the most control over what's going on. (If thats a viable option)
的GUI应用程序可能有一些问题,而忽略设置,你给它。
The GUI app may have some issues and ignore settings you give it.
这篇关于Appium找不到设备,重新启动服务器ADB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!