When I running the code, it says "0 device(s) connected"
Closed this issue · 3 comments
Hi,
thanks for hte very good sample.
But when I running the code, it says "0 device(s) connected", can you help for this.
thanks.
The device is locked successfully
[Appium] Welcome to Appium v1.6.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.6.0","revision":null}}
this.service.getUrl(): http://0.0.0.0:4723/wd/hub
[HTTP] <-- GET /wd/hub/status 200 109 ms - 83
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk","platformName":"Android","udid":"FA48TSR00335","deviceName":"ANDROID"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk","platformName":"Android","udid":"FA48TSR00335","deviceName":"ANDROID"},null,null,null]
[Appium] Creating new AndroidDriver session
[Appium] Capabilities:
[Appium] app: 'D:\WorkSpace\appium-stf-example\src\test\resources\ApiDemos-debug.apk'
[Appium] platformName: 'Android'
[Appium] udid: 'FA48TSR00335'
[Appium] deviceName: 'ANDROID'
[debug] [AndroidDriver] AndroidDriver version: 1.10.30
[BaseDriver] Session created with session id: 1708f4b9-8575-4fdc-9e45-596c476c7ae9
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_112
[ADB] Checking whether adb is present
[ADB] Using adb.exe from F:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Could not find devices, restarting adb server...
What is the output of your adb devices
command?
there's no any device with "adb devices"
and I checked the code, in connectToStfDevice()
we just get the remote adb connect address, but we didn't run at local comptuer.
so I try to run adb connect xxx.xxx.xxx.xxx:xxxx
manually first , the code working.
I think we should add the adb connect
command in the test code.
That is not happening for everyone. So you might have to check your system settings.