Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selendroid cannot recognize Android 7 device

I have a Nexus 5X running Android 7.0 (security patch level: November 5, 2016; Build number: N5D91L) plugged into my Mac with USB debugging enabled.

ADB recognizes the device (so this solution is not relevant):

$ adb devices -l
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
016e07928f462163       device usb:337641472X product:bullhead model:Nexus_5X device:bullhead

I turn on the Selendroid server using the demo setup:

java -jar selendroid-standalone-0.17.0-with-dependencies.jar -app selendroid-test-app-0.17.0.apk

But when I check http://localhost:4444/wd/hub/status, the device is not listed in supportedDevices:

{
  "value": {
    "os": {
      "name": "Mac OS X",
      "arch": "x86_64",
      "version": "10.11.6"
    },
    "build": {
      "browserName": "selendroid",
      "version": "0.17.0"
    },
    "supportedDevices": [],
    "supportedApps": [
      {
        "mainActivity": "io.selendroid.testapp.HomeScreenActivity",
        "appId": "io.selendroid.testapp:0.17.0",
        "basePackage": "io.selendroid.testapp"
      },
      {
        "mainActivity": "io.selendroid.androiddriver.WebViewActivity",
        "appId": "io.selendroid.androiddriver:0.17.0",
        "basePackage": "io.selendroid.androiddriver"
      }
    ]
  },
  "status": 0
}

The same basic procedure will show an Android 6 device or emulator.

How can I make Selendroid recognize my Android 7 device?

like image 430
user513951 Avatar asked Nov 09 '22 05:11

user513951


1 Answers

I might be missing something, but http://selendroid.io/ states that it has "Multiple Android target API support (10 to 19)". Android 7 is API 24, so not supported. I have had Selendroid successfully launch against higher APIs than 19 (certainly 23) then fail to actually instrument any actions, but maybe it just can't start 24 at all?

Might be time to try Appium instead...

like image 105
Marc Avatar answered Nov 15 '22 06:11

Marc