Appium appium 在 dos 窗口启动,输入 appium 报以下错误且脚本运行报错: 服务端 Unknown error

John-xinhua · 2017年09月15日 · 1272 次阅读

appium 版本 1.4.16_1
java 版本 1.8

我在执行脚本的时候,也报以下错误,不知是否是上面影响的

Checking if an update is available
Update not available
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
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
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":{"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","platformVersion":"6.0","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"Android Emulator"}}
info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_66)
info: [debug] Using local app from desired caps: D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] Creating new appium session c20f9085-b91b-4d65-91f0-deb51ea62686
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_66
info: [debug] Checking whether adb is present
info: [debug] Using adb from G:\sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device fde3b6b1
info: [debug] Setting device id to fde3b6b1
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 wait-for-device
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: Device API level is: 23
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\javaworkspace\Appium_demo\apps\TPMP.apk" "C:\Users\codyy\AppData\Local\Temp\com.codyy.tpmp.tpmpandroid.te"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 push "C:\Users\codyy\AppData\Local\Temp\com.codyy.tpmp.tpmpandroid.te\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from G:\sdk\build-tools\26.0.0\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: G:\sdk\build-tools\26.0.0\aapt.exe dump xmltree D:\javaworkspace\Appium_demo\apps\TPMP.apk AndroidManifest.xml
info: [debug] Set app process to: com.codyy.tpmp.tpmpandroid.te
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for D:\javaworkspace\Appium_demo\apps\TPMP.apk.
info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] App already signed.
info: [debug] Zip-aligning D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from G:\sdk\build-tools\26.0.0\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: G:\sdk\build-tools\26.0.0\zipalign.exe -f 4 D:\javaworkspace\Appium_demo\apps\TPMP.apk C:\Users\codyy\AppData\Local\Temp\117815-15612-1ezk5bc\appium.tmp
info: [debug] MD5 for app is dbd2ce9b9d0492df7d4c0fac07fe7ef8
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "ls /data/local/tmp/dbd2ce9b9d0492df7d4c0fac07fe7ef8.apk"
info: [debug] Getting install status for com.codyy.tpmp.tpmpandroid.te
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "pm list packages -3 com.codyy.tpmp.tpmpandroid.te"
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "am force-stop com.codyy.tpmp.tpmpandroid.te"
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "pm clear com.codyy.tpmp.tpmpandroid.te"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.codyy.tpmp.tpmpandroid.te -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
info: [debug] Device is at API Level 23
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity"
info: [debug] Waiting for pkg "com.codyy.tpmp.tpmpandroid.te" and activity "com.codyy.tpmp.tpmpandroid.login.LoginActivity" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
error: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.login.LoginActivity never started. Current: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.MainActivity
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 22.917
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.login.LoginActivity never started. Current: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.MainActivity
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1314:12)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1258:7)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.login.LoginActivity never started. Current: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.MainActivity)","origValue":"com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.login.LoginActivity never started. Current: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.MainActivity"},"sessionId":null}
error: Failed to start an Appium session, err was: Error: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.login.LoginActivity never started. Current: com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.MainActivity
info: <-- POST /wd/hub/session 500 35284.268 ms - 502
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","platformVersion":"6.0","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"Android Emulator"}}
info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_66)
info: [debug] Using local app from desired caps: D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] Creating new appium session f3fb9a2b-4257-487f-8203-e20ac4738dbf
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_66
info: [debug] Checking whether adb is present
info: [debug] Using adb from G:\sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device fde3b6b1
info: [debug] Setting device id to fde3b6b1
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 wait-for-device
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: Device API level is: 23
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language:
info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\javaworkspace\Appium_demo\apps\TPMP.apk" "C:\Users\codyy\AppData\Local\Temp\com.codyy.tpmp.tpmpandroid.te"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 push "C:\Users\codyy\AppData\Local\Temp\com.codyy.tpmp.tpmpandroid.te\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from G:\sdk\build-tools\26.0.0\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: G:\sdk\build-tools\26.0.0\aapt.exe dump xmltree D:\javaworkspace\Appium_demo\apps\TPMP.apk AndroidManifest.xml
info: [debug] Set app process to: com.codyy.tpmp.tpmpandroid.te
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for D:\javaworkspace\Appium_demo\apps\TPMP.apk.
info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] App already signed.
info: [debug] Zip-aligning D:\javaworkspace\Appium_demo\apps\TPMP.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from G:\sdk\build-tools\26.0.0\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: G:\sdk\build-tools\26.0.0\zipalign.exe -f 4 D:\javaworkspace\Appium_demo\apps\TPMP.apk C:\Users\codyy\AppData\Local\Temp\117815-15612-va9i9e\appium.tmp
info: [debug] MD5 for app is dbd2ce9b9d0492df7d4c0fac07fe7ef8
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "ls /data/local/tmp/dbd2ce9b9d0492df7d4c0fac07fe7ef8.apk"
info: [debug] Getting install status for com.codyy.tpmp.tpmpandroid.te
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "pm list packages -3 com.codyy.tpmp.tpmpandroid.te"
info: [debug] App is not installed
info: Installing App
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "mkdir -p /data/local/tmp/"
info: [debug] Removing any old apks
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "ls /data/local/tmp/*.apk"
info: [debug] Found an apk we want to keep at /data/local/tmp/dbd2ce9b9d0492df7d4c0fac07fe7ef8.apk
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell rm "/data/local/tmp/2016-07-25-11com.dragon.android.pandaspace{22760D0D-0A28-4A03-B7E0-3CCA81C1EF3E}.apk" && rm "/data/local/tmp/2016-07-25-12com.dragon.android.pandaspace{51996C04-8EC7-4D38-99A5-65E8C6A7D896}.apk" && rm "/data/local/tmp/2016-07-25-14com.dragon.android.pandaspace{9AF899B7-2EE5-478F-BE82-6F477BDA871B}.apk" && rm "/data/local/tmp/2016-07-25-14com.dragon.android.pandaspace{A8203357-4259-4F38-8B20-485AE3E0DC63}.apk" && rm "/data/local/tmp/2016-07-25-14com.dragon.android.pandaspace{AEA55490-CA71-439D-A76D-E48C2E6AEC2F}.apk" && rm "/data/local/tmp/2016-07-25-14com.dragon.android.pandaspace{C800E98C-1C20-4C23-95D6-C802CB69CCF8}.apk" && rm "/data/local/tmp/2016-07-25-15com.dragon.android.pandaspace{CF8C8D38-3D4C-4EC3-8000-417658AD57D4}.apk" && rm "/data/local/tmp/2016-07-25-16com.dragon.android.pandaspace{602431FD-EFDA-47F8-9940-71A31EBCBB0F}.apk" && rm "/data/local/tmp/2016-07-26-12com.dragon.android.pandaspace{9728302F-6D29-4681-A880-86D6C7142A18}.apk" && rm "/data/local/tmp/29649242b53e9a67ba855b067422713c.apk" && rm "/data/local/tmp/daemonV5.apk" && rm "/data/local/tmp/mq_1474254238.apk" && rm "/data/local/tmp/qb_kdoeyfxmei.apk"
info: [debug] Uninstalling com.codyy.tpmp.tpmpandroid.te
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "am force-stop com.codyy.tpmp.tpmpandroid.te"
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 uninstall com.codyy.tpmp.tpmpandroid.te
info: [debug] App was not uninstalled, maybe it wasn't on device?
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "pm install -r /data/local/tmp/dbd2ce9b9d0492df7d4c0fac07fe7ef8.apk"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.codyy.tpmp.tpmpandroid.te -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
info: [debug] Getting device API level
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 23
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.codyy.tpmp.tpmpandroid.te/com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity"
info: [debug] Waiting for pkg "com.codyy.tpmp.tpmpandroid.te" and activity "com.codyy.tpmp.tpmpandroid.login.LoginActivity" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Getting focused package and activity
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "dumpsys window windows"
info: [debug] Setting auto webview
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "cat /proc/net/unix"
info: [debug] Available contexts:
info: [debug] []
info: [debug] Available contexts: NATIVE_APP
info: [debug] Retrying context switch with timeout '2000'
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "cat /proc/net/unix"
info: [debug] Available contexts: NATIVE_APP
info: [debug] []
info: [debug] Available contexts: NATIVE_APP
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "getprop ro.build.version.release"
info: [debug] Device is at release version 6.0.1
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId f3fb9a2b-4257-487f-8203-e20ac4738dbf
info: <-- POST /wd/hub/session 303 37757.988 ms - 74
info: --> GET /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf {}
info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"6.0.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","platformVersion":"6.0","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"Android Emulator"},"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"fde3b6b1"},"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: <-- GET /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf 200 4.566 ms - 1085 {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"6.0.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","platformVersion":"6.0","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"Android Emulator"},"app":"D:\javaworkspace\Appium_demo\apps\TPMP.apk","appPackage":"com.codyy.tpmp.tpmpandroid.te","appActivity":"com.codyy.tpmp.tpmpandroid.commons.controllers.LaunchActivity","appWaitPackage":"com.codyy.tpmp.tpmpandroid.te","appWaitActivity":"com.codyy.tpmp.tpmpandroid.login.LoginActivity","autoWebview":true,"platformName":"Android","deviceName":"fde3b6b1"},"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: --> POST /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf/element {"using":"id","value":"et_username"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"et_username","context":"","multiple":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"et_username","context":"","multiple":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding et_username using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=com.codyy.tpmp.tpmpandroid.te:id/et_username]
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":{"ELEMENT":"1"}}
info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: <-- POST /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf/element 200 100.295 ms - 87 {"status":0,"value":{"ELEMENT":"1"},"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: --> POST /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf/element/1/value {"id":"1","value":["huubeiadmin"]}
info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"1","text":"huubeiadmin","replace":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"1","text":"huubeiadmin","replace":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: setText
info: [debug] [BOOTSTRAP] [debug] Using element passed in.
info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: huubeiadmin
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":13,"value":"Unknown error"}
info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"Unknown error"},"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: <-- POST /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf/element/1/value 500 295.266 ms - 182
info: --> DELETE /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf {}
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: G:\sdk\platform-tools\adb.exe -s fde3b6b1 shell "input keyevent 3"
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 9.898
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}
info: <-- DELETE /wd/hub/session/f3fb9a2b-4257-487f-8203-e20ac4738dbf 200 1426.162 ms - 76 {"status":0,"value":null,"sessionId":"f3fb9a2b-4257-487f-8203-e20ac4738dbf"}

我的代码如下

附言 1  ·  2017年09月15日

新手提问,哪位大侠帮忙看看

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册