2016-10-03 14 views
0

Appiumサーバーはデバイスを検出しましたが、コマンドを送信できないため、テストは実行されていません。 AppiumにSDKのパスを設定Windows上でAndroid用Appium 1.4.13.1のテストを実行できません。

私の理想の機能>>

capabilities.setCapability("appium-version", "1.4.13.1"); capabilities.setCapability("BROWSER_NAME", ""); 
capabilities.setCapability("platformVersion", "6.0"); capabilities.setCapability("deviceName", "EQ5LA6UGPJPNCAT4"); 
capabilities.setCapability("platformName", "Android"); capabilities.setCapability("appPackage", "com.gorillalogic.monkeytalk.demo1"); 

capabilities.setCapability("appActivity", "com.gorillalogic.monkeytalk.demo1/com.gorillalogic.monkeytalk.demo1.RootActivity"); 

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); 

Appiumサーバーのログは>>

Checking if an update is available

Update available to new version 1.4.16.1

Downloading File from https://bitbucket.org/appium/appium.app/downloads/AppiumForWindows_1_4_16_1.zip

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color

warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!

info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)

info: Appium REST http interface listener started on 127.0.0.1:4723

info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"23","automationName":"Appium"}

info: Console LogLevel: debug info: --> POST /wd/hub/session {"desiredCapabilities":{"appPackage":"com.gorillalogic.monkeytalk.demo1","appActivity":"com.gorillalogic.monkeytalk.demo1/com.gorillalogic.monkeytalk.demo1.RootActivity","appium-version":"1.4.13.1","BROWSER_NAME":"","platformVersion":"6.0","platformName":"Android","deviceName":"EQ5LA6UGPJPNCAT4"}}

info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)

info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, BROWSER_NAME

info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device

info: [debug] Creating new appium session 76d81d77-d187-4dd1-99d1-a469dad3e463

info: Starting android appium

info: [debug] Getting Java version

info: Java version is: 1.8.0

info: [debug] Checking whether adb is present

warn: The ANDROID_HOME environment variable is not set to the Android SDK root directory path. ANDROID_HOME is required for compatibility with SDK 23+. Checking along PATH for adb.

info: [debug] executing cmd: where adb

info: [debug] Using adb from D:\SDK\platform-tools\adb.exe

warn: No app capability, can't parse package/activity

info: [debug] Using fast reset? true

info: [debug] Preparing device for session

info: [debug] Not checking whether app is present since we are assuming it's already on the device

info: Retrieving device info: [debug] Trying to find a connected android device

info: [debug] Getting connected devices...

info: [debug] executing cmd: "D:\SDK\platform-tools\adb.exe" devices

info: [debug] 1 device(s) connected

info: Found device EQ5LA6UGPJPNCAT4

info: [debug] Setting device id to EQ5LA6UGPJPNCAT4

info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)

info: [debug] executing cmd: "D:\SDK\platform-tools\adb.exe" -s EQ5LA6UGPJPNCAT4 wait-for-device

info: [debug] executing cmd: "D:\SDK\platform-tools\adb.exe" -s EQ5LA6UGPJPNCAT4 shell "echo 'ready'"

info: [debug] Starting logcat capture

error: Logcat capture failed: spawn ENOENT

info: [debug] Stopping logcat capture

答えて

0

問題を解決しました。今テストは正常に実行されています。

0
  1. 機能にデバイス名を渡していません。 機能にデバイス名を追加してみます。
  2. "ANDROID_HOME"環境変数をandroid sdkパスに追加します。
  3. appiumでもsdkのパスを確認してください。
関連する問題