Reputation: 17
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.
When I start Appium.exe, bearing the application (apk) path, package name and activity the Appium console displays the following error:
ERROR: error: Could not pre-launch appium: Error: Could not find a connected Android device
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?
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 Path: C:\sdk\sdk\platform-tools
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.
Upvotes: 0
Views: 3739
Reputation: 29
This is what solved my problem-
path
.C:\WINDOWS\system32
. If not, go to step 3.%SYSTEMROOT%\System32
This happens when Appium/ADB has problem reading and expanding your System32 folder.
Upvotes: 3
Reputation: 3146
Yes, so the most finnicky part of Appium is the desired_capabilities
and server_arguments
.
So Step 1:
Issue:
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.
Uncheck that.
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.
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)
The GUI app may have some issues and ignore settings you give it.
Upvotes: 0