请问是怎么解决的?我也遇到了
@chenhengjie123 谢谢你们耐心帮忙
@eurekasaber 哦,原来是这样,谢谢你们,看来还是得用 adb 命令代替了
@eurekasaber
贴了,如上,挺长的
appium log,如下有用的应该就是最后那些,你帮看看,麻烦了
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' lib/server/main.js --command-timeout "7200" --debug-log-spacing --automation-name "Appium" --platform-name "Android" --platform-version "4.4" --app "/Users/lixin/work/workspace/search_app_automation/testcase/DianpingApp/android/appium/Dianping_huidutest_7.6.0.apk" --dont-stop-app-on-reset --device-name "022MWW146T007732"
info: Welcome to Appium v1.4.1 (REV ce6220829063679bcccf5724515c29569c4a16d9)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: [debug] Non-default server args: {"app":"/Users/lixin/work/workspace/search_app_automation/testcase/DianpingApp/android/appium/Dianping_huidutest_7.6.0.apk","deviceName":"022MWW146T007732","platformName":"Android","platformVersion":"4.4","automationName":"Appium","defaultCommandTimeout":7200,"dontStopAppOnReset":true,"debugLogSpacing":true}
info: Console LogLevel: debug
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.1","revision":"ce6220829063679bcccf5724515c29569c4a16d9"}}}
info: <-- GET /wd/hub/status 200 9.911 ms - 104 {"status":0,"value":{"build":{"version":"1.4.1","revision":"ce6220829063679bcccf5724515c29569c4a16d9"}}}
info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"022MWW146T007732","useKeystore":"True","unicodeKeyboard":"True","automationName":"Selendroid","resetKeyboard":"True","platformVersion":"4.2","appPackage":"com.dianping.v1","app":"/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk","platformName":"Android","appActivity":"com.dianping.main.guide.SplashScreenActivity"}}
info: Client User-Agent string: Python-urllib/2.7
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: **** NEW SESSION ***
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
info: *************************************
warn: Converting cap useKeystore from string to boolean. This might cause unexpected behavior.
warn: Converting cap unicodeKeyboard from string to boolean. This might cause unexpected behavior.
warn: Converting cap resetKeyboard from string to boolean. This might cause unexpected behavior.
info: [debug] Using local app from desired caps: /Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk
info: [debug] Creating new appium session 556141e7-43ce-4ead-8583-8bc9b58946d9
info: [debug] Starting selendroid server
info: [debug] Getting Java version
info: Java version is: 1.7.0_79
info: [debug] Checking whether adb is present
info: [debug] Using adb from /Users/lixin/Library/Android/sdk/platform-tools/adb
info: [debug] Checking whether selendroid is built yet
info: [debug] Selendroid server exists!
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: /Users/lixin/Library/Android/sdk/platform-tools/adb devices
info: [debug] 1 device(s) connected
info: Found device 022MWW146T007732
info: [debug] Setting device id to 022MWW146T007732
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 wait-for-device
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from /Users/lixin/Library/Android/sdk/build-tools/android-4.4W/aapt
info: [debug] Checking if has internet permission from manifest.
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/build-tools/android-4.4W/aapt dump badging /Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk
info: [debug] Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: [debug] Checking signed status of /tmp/selendroid.com.dianping.v1.apk
info: [debug] Checking signed status of /Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk
info: [debug] Printing keystore md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -list -alias androiddebugkey -keystore /Users/lixin/.android/debug.keystore -storepass android
info: [debug] Printing keystore md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -list -alias androiddebugkey -keystore /Users/lixin/.android/debug.keystore -storepass android
info: [debug] Keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Entry: META-INF/ANDROIDD.RSA
info: [debug] entryPath: /tmp/com.dianping.v1/cert
info: [debug] entryFile: /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] extracted!
info: [debug] Printing apk md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -printcert -file /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] Keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Entry: META-INF/ANDROIDD.RSA
info: [debug] entryPath: /tmp/com.dianping.v1/cert
info: [debug] entryFile: /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] extracted!
info: [debug] Printing apk md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -printcert -file /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] entryHash MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Matches keystore? true
info: [debug] entryHash MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Matches keystore? true
info: [debug] Rebuilt selendroid apk exists, doing nothing
info: [debug] Getting install status for com.dianping.v1.selendroid
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "getprop ro.build.version.sdk"
info: [debug] MD5 for selendroid server is 8da538464ee7f7a1f98379bb089d6845
info: [debug] Device is at API Level 19
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "pm list packages -3 com.dianping.v1.selendroid"
info: [debug] App is installed
info: [debug] Rebuilt selendroid is already installed
info: [debug] Extracting strings for language: default
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language: zh
info: [debug] java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools.jar" "stringsFromApk" "/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk" "/tmp/com.dianping.v1" zh
info: [debug] No strings.xml for language 'zh', getting default strings.xml
info: [debug] java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools.jar" "stringsFromApk" "/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk" "/tmp/com.dianping.v1"
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Printing keystore md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -list -alias androiddebugkey -keystore /Users/lixin/.android/debug.keystore -storepass android
info: [debug] Keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Entry: META-INF/ANDROIDD.RSA
info: [debug] entryPath: /tmp/com.dianping.v1/cert
info: [debug] entryFile: /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] extracted!
info: [debug] Printing apk md5.
info: [debug] executing cmd: "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/keytool" -v -printcert -file /tmp/com.dianping.v1/cert/META-INF/ANDROIDD.RSA
info: [debug] entryHash MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] keystore MD5: E0:7E:9D:13:86:7C:27:DB:7F:BC:8D:E2:25:12:3D:A5
info: [debug] Matches keystore? true
info: [debug] MD5 for app is bcef6d3a87cb2bab90da55fad186e207
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "ls /data/local/tmp/bcef6d3a87cb2bab90da55fad186e207.apk"
info: [debug] Getting install status for com.dianping.v1
info: [debug] Getting device API level
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 19
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "pm list packages -3 com.dianping.v1"
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "am force-stop com.dianping.v1"
info: --> GET /wd/hub/status {}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"Did not successfully proxy server command"},"sessionId":"556141e7-43ce-4ead-8583-8bc9b58946d9"}
info: <-- GET /wd/hub/status 500 23.851 ms - 210
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "pm clear com.dianping.v1"
info: [debug] Forwarding system:8080 to device:8080
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 forward tcp:8080 tcp:8080
info: [debug] Enabling Unicode keyboard support
info: [debug] Pushing unicode ime to device...
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unicode_ime_apk/UnicodeIME-debug.apk"
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "settings get secure default_input_method"
info: [debug] Unsetting IME 'io.appium.android.ime/.UnicodeIME'
info: [debug] Setting IME to 'io.appium.android.ime/.UnicodeIME'
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "ime enable io.appium.android.ime/.UnicodeIME"
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "ime set io.appium.android.ime/.UnicodeIME"
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/settings_apk/settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk"
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "am instrument -e main_activity 'com.dianping.main.guide.SplashScreenActivity' com.dianping.v1.selendroid/io.selendroid.server.ServerInstrumentation"
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: [debug] Selendroid server is alive!
info: [debug] Listening for Selendroid logs
info: [debug] Creating Selendroid session
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session","method":"POST","json":{"desiredCapabilities":{"warnings":{},"desired":{"deviceName":"022MWW146T007732","useKeystore":true,"unicodeKeyboard":true,"automationName":"Selendroid","resetKeyboard":true,"platformVersion":"4.2","appPackage":"com.dianping.v1","app":"/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk","platformName":"Android","appActivity":"com.dianping.main.guide.SplashScreenActivity"},"deviceName":"022MWW146T007732","useKeystore":true,"unicodeKeyboard":true,"automationName":"Selendroid","resetKeyboard":true,"platformVersion":"4.2","appPackage":"com.dianping.v1","app":"/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk","platformName":"Android","appActivity":"com.dianping.main.guide.SplashScreenActivity"}}}
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 8
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] Successfully started selendroid session
info: [debug] Waiting for pkg "com.dianping.v1" and activity "com.dianping.main.guide.SplashScreenActivity" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "dumpsys window windows"
info: [debug] [SELENDROID] 1
info: [debug] Overriding session id with "b380c51a-16ba-cd59-6601-2b2f54898399"
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 7200 secs
info: [debug] Appium session started with sessionId b380c51a-16ba-cd59-6601-2b2f54898399
info: <-- POST /wd/hub/session 303 24214.633 ms - 74
info: --> GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399 {}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399","method":"GET"}
info: [debug] Proxied response received with status 200: {"value":{"automationName":"selendroid","platform":"android","app":"/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk","acceptSslCerts":true,"javascriptEnabled":true,"browserName":"selendroid","appActivity":"com.dianping.main.guide.SplashScreenActivity","networkConnectionEnabled":true,"rotatable":true,"desired":{"automationName":"Selendroid","platformVersion":"4.2","app":"/Users/lixin/work/workspace/android-nova/Nova/build/outputs/apk/Nova-common-debug.apk","deviceName":"022MWW146T007732","platformName":"Android","appActivity":"com.dianping.main.guide.SplashScreenActivity","unicodeKeyboard":true,"resetKeyboard":true,"useKeystore":true,"appPackage":"com.dianping.v1"},"useKeystore":true,"appPackage":"com.dianping.v1","version":"0.15.0","platformVersion":"19","deviceName":"022MWW146T007732","platformName":"android","handlesAlerts":true,"unicodeKeyboard":true,"resetKeyboard":true,"warnings":{},"takesScreenshot":true},"status":0,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399 200 107.371 ms - 1025
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] dpid=2815370903024012141
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] Connecting...
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] Start connect with load balance
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] connected=true
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] lastNetworkType=1
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] activeNetworkType=1
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] >80{n:"wifi",o:"0",c:"0",d:"2815370903024012141",t:"38",b:"1",v:"7.7.0"}
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] <83[{"s":"180.153.132.23","p":"80","h":"240","r":"3"},{"s":"180.153.132.19","p":"80","h":"240","r":"3"},{"s":"180.153.132.21","p":"80","h":"240","r":"3"},{"s":"221.130.190.246","p":"443","h":"240","r":"3"},{"s":"140.207.219.169","p":"80","h":"240","r":"3"}]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] socket selected Socket[address=/180.153.132.21,port=80,localPort=33394] in 39ms
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] select connect from loadbanalce
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] Connection established to /180.153.132.21:80
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] >1{d:"2815370903024012141",b:"1",v:"7.7.0"}
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] [16:45:44]
info: [debug] [SELENDROID] <2{"wl":[],"bl":["rgc.bin"],"t":1}
info: [debug] [SELENDROID ERR] EAGAIN (Try again)
info: [debug] [SELENDROID ERR] at java.nio.FileChannelImpl.basicLock(FileChannelImpl.java:123)
info: [debug] [SELENDROID ERR] at java.nio.FileChannelImpl.tryLock(FileChannelImpl.java:177)
info: [debug] [SELENDROID ERR] at java.nio.channels.FileChannel.tryLock(FileChannel.java:587)
info: [debug] [SELENDROID ERR] at com.tencent.beacon.a.k.a(ProGuard:65)
info: [debug] [SELENDROID ERR] at com.tencent.beacon.event.p.b(ProGuard:806)
info: [debug] [SELENDROID ERR] at com.tencent.beacon.a.b.d.run(ProGuard:236)
info: [debug] [SELENDROID ERR] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
info: [debug] [SELENDROID ERR] at java.util.concurrent.FutureTask.run(FutureTask.java:237)
info: [debug] [SELENDROID ERR] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
info: [debug] [SELENDROID ERR] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
info: [debug] [SELENDROID ERR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
info: [debug] [SELENDROID ERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
info: [debug] [SELENDROID ERR] at java.lang.Thread.run(Thread.java:841)
info: [debug] [SELENDROID ERR] EAGAIN (Try again)
info: [debug] [SELENDROID ERR] at libcore.io.Posix.fcntlFlock(Native Method)
info: [debug] [SELENDROID ERR] at libcore.io.ForwardingOs.fcntlFlock(ForwardingOs.java:54)
info: [debug] [SELENDROID ERR] at java.nio.FileChannelImpl.basicLock(FileChannelImpl.java:121)
info: [debug] [SELENDROID ERR] ... 12 more
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element {"using":"link text","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"首页"}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element","method":"POST","json":{"using":"link text","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"首页"}}
info: [debug] Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"Element was not found."},"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element 500 5094.754 ms - 201
info: --> GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/appium/device/current_activity {}
info: [debug] Getting focused package and activity
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "dumpsys window windows"
info: [debug] Responding to client with success: {"status":0,"value":"com.dianping.main.city.CityListSwitchActivity","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/appium/device/current_activity 200 89.047 ms - 119 {"status":0,"value":"com.dianping.main.city.CityListSwitchActivity","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] [16:45:53]
info: [debug] [SELENDROID] [16:45:53]
info: [debug] [SELENDROID] Service started with intent=Intent { act=com.dianping.push.START cmp=com.dianping.v1/com.dianping.base.push.pushservice.dp.DPPushService }
info: [debug] [SELENDROID] [16:45:53]
info: [debug] [SELENDROID] [16:45:53]
info: [debug] [SELENDROID] Attempt to start connection that is already active
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] at java.lang.System.loadLibrary(System.java:555)
info: [debug] [SELENDROID] at java.lang.System.loadLibrary(System.java:555)
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID ERR] com.dianping.main.guide.MainActivity$2@437c53b8
info: [debug] [SELENDROID ERR] at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:682)
info: [debug] [SELENDROID ERR] at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1540)
info: [debug] [SELENDROID ERR] at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:489)
info: [debug] [SELENDROID ERR] at com.dianping.main.guide.MainActivity.onDestroy(MainActivity.java:432)
info: [debug] [SELENDROID ERR] at android.app.Activity.performDestroy(Activity.java:5569)
info: [debug] [SELENDROID ERR] at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1120)
info: [debug] [SELENDROID ERR] at io.selendroid.server.ServerInstrumentation.callActivityOnDestroy(ServerInstrumentation.java:194)
info: [debug] [SELENDROID ERR] at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3712)
info: [debug] [SELENDROID ERR] at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3743)
info: [debug] [SELENDROID ERR] at android.app.ActivityThread.access$1700(ActivityThread.java:141)
info: [debug] [SELENDROID ERR] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1295)
info: [debug] [SELENDROID ERR] at android.os.Handler.dispatchMessage(Handler.java:102)
info: [debug] [SELENDROID ERR] at com.dianping.util.SafeLooper.run(SafeLooper.java:84)
info: [debug] [SELENDROID ERR] at android.os.Handler.handleCallback(Handler.java:733)
info: [debug] [SELENDROID ERR] at android.os.Handler.dispatchMessage(Handler.java:95)
info: [debug] [SELENDROID ERR] at android.os.Looper.loop(Looper.java:136)
info: [debug] [SELENDROID ERR] at android.app.ActivityThread.main(ActivityThread.java:5271)
info: [debug] [SELENDROID ERR] at java.lang.reflect.Method.invokeNative(Native Method)
info: [debug] [SELENDROID ERR] at java.lang.reflect.Method.invoke(Method.java:515)
info: [debug] [SELENDROID ERR] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:851)
info: [debug] [SELENDROID ERR] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:667)
info: [debug] [SELENDROID ERR] at dalvik.system.NativeStart.main(Native Method)
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element {"using":"link text","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"上海"}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element","method":"POST","json":{"using":"link text","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"上海"}}
info: [debug] Proxied response received with status 200: {"value":{"ELEMENT":"724e4748-84e8-876d-bf4e-1c99e1bd1462"},"status":0,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element 200 35.250 ms - 122
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/724e4748-84e8-876d-bf4e-1c99e1bd1462/click {"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","id":"724e4748-84e8-876d-bf4e-1c99e1bd1462"}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/724e4748-84e8-876d-bf4e-1c99e1bd1462/click","method":"POST","json":{"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","id":"724e4748-84e8-876d-bf4e-1c99e1bd1462"}}
info: [debug] Proxied response received with status 200: {"value":"","status":0,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/724e4748-84e8-876d-bf4e-1c99e1bd1462/click 200 654.077 ms - 74
info: --> GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/appium/device/current_activity {}
info: [debug] Getting focused package and activity
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "dumpsys window windows"
info: [debug] Responding to client with success: {"status":0,"value":"com.dianping.main.guide.MainActivity","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- GET /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/appium/device/current_activity 200 88.711 ms - 110 {"status":0,"value":"com.dianping.main.guide.MainActivity","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 8
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] HoldService:mRequestCount = 1
info: [debug] [SELENDROID] HoldService:preHoldShow start!
info: [debug] [SELENDROID] TipsLifecycle:removeTipRecord 10662, 16
info: [debug] [SELENDROID] 1
info: [debug] [SELENDROID] SystemUI onReceive intent action = android.intent.action.TIME_TICK
info: [debug] [SELENDROID] SystemUI updateClock currentTimeMillis = 1436258760019
info: [debug] [SELENDROID] SystemUI AM_PM_STYLE = 1
info: [debug] [SELENDROID] SystemUI updateClock b24 = true
info: [debug] [SELENDROID] SystemUI result = 16:46
info: [debug] [SELENDROID] SystemUI onReceive intent action = android.intent.action.TIME_TICK
info: [debug] [SELENDROID] SystemUI updateClock currentTimeMillis = 1436258760049
info: [debug] [SELENDROID] SystemUI AM_PM_STYLE = 1
info: [debug] [SELENDROID] SystemUI updateClock b24 = true
info: [debug] [SELENDROID] SystemUI result = 16:46
info: [debug] [SELENDROID] SystemUI onReceive intent action = android.intent.action.TIME_TICK
info: [debug] [SELENDROID] SystemUI updateClock currentTimeMillis = 1436258760054
info: [debug] [SELENDROID] SystemUI AM_PM_STYLE = 1
info: [debug] [SELENDROID] SystemUI updateClock b24 = true
info: [debug] [SELENDROID] SystemUI result = 16:46
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element {"using":"id","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"start_search"}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element","method":"POST","json":{"using":"id","sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","value":"start_search"}}
info: [debug] Proxied response received with status 200: {"value":{"ELEMENT":"f39dc34f-7b20-bccc-4595-bd816f0eb6f1"},"status":0,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element 200 109.691 ms - 122
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/f39dc34f-7b20-bccc-4595-bd816f0eb6f1/click {"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","id":"f39dc34f-7b20-bccc-4595-bd816f0eb6f1"}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/f39dc34f-7b20-bccc-4595-bd816f0eb6f1/click","method":"POST","json":{"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","id":"f39dc34f-7b20-bccc-4595-bd816f0eb6f1"}}
info: [debug] Proxied response received with status 200: {"value":"","status":0,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/element/f39dc34f-7b20-bccc-4595-bd816f0eb6f1/click 200 642.868 ms - 74
info: --> POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/touch/perform {"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","actions":[{"action":"tap","options":{"y":500,"x":500,"count":1}}]}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/touch/perform","method":"POST","json":{"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399","actions":[{"action":"tap","options":{"y":500,"x":500,"count":1}}]}}
info: [debug] Proxied response received with status 404: undefined
info: <-- POST /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399/touch/perform 404 14.168 ms - -
info: --> DELETE /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399 {}
info: Shutting down appium session
info: [debug] Resetting IME to 'io.appium.android.ime/.UnicodeIME'
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "ime set io.appium.android.ime/.UnicodeIME"
info: [debug] Stopping selendroid server
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399","method":"DELETE"}
info: [debug] executing cmd: /Users/lixin/Library/Android/sdk/platform-tools/adb -s 022MWW146T007732 shell "am force-stop com.dianping.v1"
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Cleaning up appium session
info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: <-- DELETE /wd/hub/session/b380c51a-16ba-cd59-6601-2b2f54898399 200 2035.059 ms - 76 {"status":0,"value":null,"sessionId":"b380c51a-16ba-cd59-6601-2b2f54898399"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.4.1","revision":"ce6220829063679bcccf5724515c29569c4a16d9"}}}
info: <-- GET /wd/hub/status 200 1.250 ms - 104 {"status":0,"value":{"build":{"version":"1.4.1","revision":"ce6220829063679bcccf5724515c29569c4a16d9"}}}
@yuwuhen333
真的没有再详细的错误了。。。我也很纳闷
Traceback (most recent call last):
File "ape_other_shoplists.py", line 83, in test_03_branches_shoplist
self.driver.tap([(500, 500), ])
File "/Library/Python/2.7/site-packages/appium/webdriver/webdriver.py", line 206, in tap
action.perform()
File "/Library/Python/2.7/site-packages/appium/webdriver/common/touch_action.py", line 94, in perform
self._driver.execute(Command.TOUCH_ACTION, params)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 175, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
WebDriverException: Message:
@chenhengjie123
appium log 没有任何 error ,没有什么信息
@eurekasaber
多加一逗号,还是同样的报错,怎么回事呢?
只能先用 adb shell input tap 操作了
@yuwuhen333
很奇怪,我多加一个逗号还是同样的报错哦,没办法最后用了 adb shell input tap 操作的
os.popen('adb -s {0} shell input tap {1} {2}'.format(self.device_id, x, y))
@sanlengjingvv 我懂你的意思了,就是写两个类,每个类的 setUp 用不同的 appWaitActivity,第一个类执行首次启动,第二个类执行其余非首次的 cases。确实,按照--no-reset 的启动方式,和我程序的逻辑,分两个 suit 确实能执行通过了,谢谢啦~