Appium 使用 selendroid 为什么应用启动了,但是所有元素都未能识别呢?

johnfad · 2014年12月01日 · 最后由 johnfad 回复于 2014年12月02日 · 1135 次阅读

hi all,
为什么我使用 selendroid 应用启动了,但是所有元素都未能识别呢?需要加什么配置吗?
下边是我的配置哦:
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.1'
desired_caps['deviceName'] = 'Android Emulator'
desired_caps['automationName'] = 'Selendroid'

appium 服务信息:

debug: Pushing settings apk to device...

debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 install "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
debug: Pushing unlock helper app to device...
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 install "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
debug: executing: "E:\software\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window"
debug: Writing dumpsys output to E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium.dumpsys.log
debug: Screen already unlocked, continuing.
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "am instrument -e main_activity 'com.cbc com.cuc.selendroid/io.selendroid.ServerInstrumentation"
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Selendroid server is alive!
debug: Listening for Selendroid logs
debug: Creating Selendroid session
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session,method:POST,json:{desiredCapabilities:{warnings:{},desired:{deviceName:Android" Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".cuc"},"deviceName":"Android Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".cuc"}}}
debug: Successfully started selendroid session
debug: Waiting for pkg "com.cuc" and activity ".cuc" to be focused
debug: Getting focused package and activity
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window windows"
debug: [SELENDROID] http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6
debug: Overriding session id with "0b54770e-cbf8-fee9-a929-f445a10d51b6"
info: <-- POST /wd/hub/session 303 99508.043 ms - 9
debug: Device launched! Ready for commands
info: --> GET /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6 {}
debug: Setting command timeout to the default of 60 secs
debug: Appium session started with sessionId 0b54770e-cbf8-fee9-a929-f445a10d51b6
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6,method:GET"}
debug: Proxied response received with status 200: "{\"value\":{\"automationName\":\"selendroid\",\"platform\":\"android\",\"platformVersion\":\"15\",\"acceptSslCerts\":true,\"javascriptEnabled\":true,\"platformName\":\"android\",\"handlesAlerts\":true,\"browserName\":\"selendroid\",\"networkConnectionEnabled\":true,\"rotatable\":true,\"takesScreenshot\":true,\"version\":\"0.10.0\"},\"status\":0,\"sessionId\":\"0b54770e-cbf8-fee9-a929-f445a10d51b6\"}"
info: <-- GET /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6 200 290.374 ms - 358
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot,method:GET"}
debug: Proxied response received with status 200: "{\"value\":\"AA==\",\"status\":0,\"sessionId\":\"0b54770e-cbf8-fee9-a929-f445a10d51b6\"}"
info: <-- GET /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot 200 5156.147 ms - 78
info: --> POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements
debug: Request received with params: {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements,method:POST,json:{using:class" name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}}
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":"0b54770e-cbf8-fee9-a929-f445a10d51b6"}
info: <-- POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements 500 54.924 ms - 210
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements
info: --> POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
debug: Request received with params: {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
info: <-- POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements 500 11.665 ms - 210
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements,method:POST,json:{using:class" name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}}
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":"0b54770e-cbf8-fee9-a929-f445a10d51b6"}
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/touch/flick
debug: Request received with params: {"sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","yspeed":-30,"xspeed":-1}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/touch/flick,method:POST,json:{sessionId:0b54770e-cbf8-fee9-a929-f445a10d51b6,yspeed:-30,xspeed:-1}"}
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":"0b54770e-cbf8-fee9-a929-f445a10d51b6"}
info: <-- POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/touch/flick 500 48.565 ms - 210
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements
info: --> POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
debug: Request received with params: {"using":"class name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements,method:POST,json:{using:class" name","sessionId":"0b54770e-cbf8-fee9-a929-f445a10d51b6","value":"android.widget.TextView"}}
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":"0b54770e-cbf8-fee9-a929-f445a10d51b6"}
info: <-- POST /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/elements 500 9.344 ms - 210
info: --> GET /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot {}
debug: Appium request initiated at /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot,method:GET"}
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":"0b54770e-cbf8-fee9-a929-f445a10d51b6"}
info: <-- GET /wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6/screenshot 500 16.873 ms - 210
debug: Didn't get a new command in 60 secs, shutting down...
info: Shutting down appium session
debug: Stopping selendroid server
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/0b54770e-cbf8-fee9-a929-f445a10d51b6,method:DELETE"}
debug: Cleaning up appium session
debug: We shut down because no new commands came in
info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"Android Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".business.Logo"}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"deviceName":"Android Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".cuc"}}
debug: Using local app from desired caps: D:\my.apk
info: Retrieving device
debug: Creating new appium session 274aab56-1317-44e7-83c3-c53b57940909
debug: Starting selendroid server
debug: Checking whether selendroid is built yet
debug: Selendroid server exists!
debug: Preparing device for session
debug: Checking whether app is actually present
debug: Checking whether adb is present
debug: Using adb from E:\android-sdk-windows\platform-tools\adb.exe
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" devices
debug: 1 device(s) connected
info: Found device emulator-5554
debug: Setting device id to emulator-5554
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 wait-for-device
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "echo 'ready'"
debug: Starting logcat capture
debug: Rebuilt selendroid apk exists, doing nothing
debug: Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
debug: Checking signed status of C:\Windows\Temp\selendroid.com.cuc.apk
debug: Checking app cert for C:\Windows\Temp\selendroid.com.cuc.apk: java -jar "E:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" "C:\Windows\Temp\selendroid.com.cuc.apk"
debug: Checking signed status of D:\my.apk
debug: Checking app cert for D:\my.apk: java -jar "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" "D:\my.apk"
debug: App already signed.
debug: Zip-aligning C:\Windows\Temp\selendroid.com.cuc.apk
debug: Checking whether zipalign is present
debug: Using zipalign from E:\software\android-sdk-windows\tools\zipalign.exe
debug: zipAlignApk: "E:\software\android-sdk-windows\tools\zipalign.exe" -f 4 "C:\Windows\Temp\selendroid.com.cuc.apk" "C:\Users\ADMINI~1\AppData\Local\Temp\appium114111-8052-1ma8fhv.tmp"
debug: App already signed.
debug: Zip-aligning D:\my.apk
debug: Checking whether zipalign is present
debug: Using zipalign from E:\android-sdk-windows\tools\zipalign.exe
debug: zipAlignApk: "E:\software\android-sdk-windows\tools\zipalign.exe" -f 4 "D:\my.apk" "C:\Users\ADMINI~1\AppData\Local\Temp\appium114111-8052-79cihi.tmp"
debug: Getting install status for com.cuc.selendroid
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "pm list packages -3 com.cuc.selendroid"
debug: App is installed
debug: Rebuilt selendroid is already installed
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "getprop persist.sys.language"
debug: Current device language: en
debug: java -jar "E:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\strings_from_apk.jar" "D:\my.apk" "C:\Windows\Temp\com.cuc" en
debug: No strings.xml for language 'en', getting default strings.xml
debug: java -jar "E:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\strings_from_apk.jar" "D:\my.apk" "C:\Windows\Temp\com.cuc"
debug: Not uninstalling app since server not started with --full-reset
debug: Checking app cert for D:\my.apk: java -jar "E:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" "D:\my.apk"
debug: App already signed.
debug: Zip-aligning D:\my.apk
debug: Checking whether zipalign is present
debug: Using zipalign from E:\android-sdk-windows\tools\zipalign.exe
debug: zipAlignApk: "E:\android-sdk-windows\tools\zipalign.exe" -f 4 "D:\my.apk" "C:\Users\ADMINI~1\AppData\Local\Temp\appium114111-8052-bmdwav.tmp"
debug: MD5 for app is 868454a4c377f8e6d0876cc370d22eff
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "ls /data/local/tmp/868454a4c377f8e6d0876cc370d22eff.apk"
debug: Getting install status for com.cuc
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "pm list packages -3 com.cuc"
debug: App is installed
info: App is already installed, resetting app
debug: Running fast reset (stop and clear)
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "am force-stop com.cuc"
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "pm clear com.cuc"
debug: Forwarding system:8080 to device:8080
debug: executing: "E:\software\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 forward tcp:8080 tcp:8080
debug: Enabling Unicode keyboard support
debug: Pushing unicode ime to device...
debug: executing: "E:\software\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 install "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\unicode_ime_apk\UnicodeIME-debug.apk"
debug: executing: "E:\software\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "settings get secure default_input_method"
debug: Unsetting IME 'settings: not found'
debug: Setting IME to 'io.appium.android.ime/.UnicodeIME'
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "ime enable io.appium.android.ime/.UnicodeIME"
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "ime set io.appium.android.ime/.UnicodeIME"
debug: [SELENDROID] at com.android.server.SystemServer.init1(Native Method)
debug: [SELENDROID] at com.android.server.SystemServer.main(SystemServer.java:808)
debug: Pushing settings apk to device...
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 install "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
debug: Pushing unlock helper app to device...
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 install "E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window"
debug: Writing dumpsys output to E:\software\AppiumForWindows-1.2.0.1\Appium\node_modules\appium.dumpsys.log
debug: Screen already unlocked, continuing.
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "am instrument -e main_activity 'com.cuc.selendroid/io.selendroid.ServerInstrumentation"
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: [SELENDROID] Selendroid started on port 8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status,method:GET"}
debug: Selendroid server is alive!
debug: Listening for Selendroid logs
debug: Creating Selendroid session
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session,method:POST,json:{desiredCapabilities:{warnings:{},desired:{deviceName:Android" Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".business.Logo"},"deviceName":"Android Emulator","unicodeKeyboard":"true","automationName":"Selendroid","platformVersion":"4.1","appPackage":"com.cuc","app":"D:\my.apk","platformName":"Android","appActivity":".cuc"}}}
debug: [SELENDROID] http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994
debug: [SELENDROID] http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994
debug: Successfully started selendroid session
debug: Waiting for pkg "com.cuc" and activity ".cuc" to be focused
debug: Getting focused package and activity
debug: executing: "E:\android-sdk-windows\platform-tools\adb.exe" -s emulator-5554 shell "dumpsys window windows"
debug: Overriding session id with "aecd8a3d-9cd0-0302-480b-9ee705451994"
debug: Device launched! Ready for commands
info: --> GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994 {}
debug: Setting command timeout to the default of 60 secs
debug: Appium session started with sessionId aecd8a3d-9cd0-0302-480b-9ee705451994
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994,method:GET"}
debug: Proxied response received with status 200: "{\"value\":{\"automationName\":\"selendroid\",\"platform\":\"android\",\"platformVersion\":\"15\",\"acceptSslCerts\":true,\"javascriptEnabled\":true,\"platformName\":\"android\",\"handlesAlerts\":true,\"browserName\":\"selendroid\",\"networkConnectionEnabled\":true,\"rotatable\":true,\"takesScreenshot\":true,\"version\":\"0.10.0\"},\"status\":0,\"sessionId\":\"aecd8a3d-9cd0-0302-480b-9ee705451994\"}"
info: <-- GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994 200 610.419 ms - 358
info: --> GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot {}
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot,method:GET"}
debug: Proxied response received with status 200: "{\"value\":\"AA==\",\"status\":0,\"sessionId\":\"aecd8a3d-9cd0-0302-480b-9ee705451994\"}"
info: <-- GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot 200 5556.838 ms - 78
debug: [SELENDROID] mSeq=0 mSystemUiVisibility=0x0
debug: [SELENDROID] mSeq=0 mSystemUiVisibility=0x0
debug: [SELENDROID] mSeq=0 mSystemUiVisibility=0x0
debug: [SELENDROID] mSeq=0 mSystemUiVisibility=0x0
info: --> POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements
debug: Request received with params: {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements,method:POST,json:{using:class" name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}}
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":"aecd8a3d-9cd0-0302-480b-9ee705451994"}
info: <-- POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements 500 25.930 ms - 210
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements
info: --> POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Request received with params: {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements,method:POST,json:{using:class" name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}}
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":"aecd8a3d-9cd0-0302-480b-9ee705451994"}
info: <-- POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements 500 21.635 ms - 210
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/touch/flick
info: --> POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/touch/flick {"sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","yspeed":-30,"xspeed":-1}
debug: Request received with params: {"sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","yspeed":-30,"xspeed":-1}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/touch/flick,method:POST,json:{sessionId:aecd8a3d-9cd0-0302-480b-9ee705451994,yspeed:-30,xspeed:-1}"}
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":"aecd8a3d-9cd0-0302-480b-9ee705451994"}
info: <-- POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/touch/flick 500 9.814 ms - 210
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements
info: --> POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Request received with params: {"using":"class name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements,method:POST,json:{using:class" name","sessionId":"aecd8a3d-9cd0-0302-480b-9ee705451994","value":"android.widget.TextView"}}
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":"aecd8a3d-9cd0-0302-480b-9ee705451994"}
info: <-- POST /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/elements 500 6.699 ms - 210
info: --> GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot {}
debug: Appium request initiated at /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot
debug: Request received with params: {}
debug: Proxying command to localhost:8080
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot,method:GET"}
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":"aecd8a3d-9cd0-0302-480b-9ee705451994"}
info: <-- GET /wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994/screenshot 500 13.303 ms - 210
debug: Didn't get a new command in 60 secs, shutting down...
info: Shutting down appium session
debug: Stopping selendroid server
debug: Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/aecd8a3d-9cd0-0302-480b-9ee705451994,method:DELETE"}
debug: Cleaning up appium session
debug: We shut down because no new commands came in

共收到 5 条回复 时间 点赞

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"},

贴个代码呗

代码如下:
class mytest(unittest.TestCase):
def setUp(self):
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.1'
desired_caps['deviceName'] = 'Android Emulator'
desired_caps['automationName'] = 'Selendroid'
desired_caps['app'] = PATH('D:/my.apk')
desired_caps['appPackage'] = 'com.cuc'
desired_caps['appActivity'] = '.cuc'
#desired_caps['aut'] = 'io.selendroid.testapp:0.10.0'
#desired_capabilities = {'aut': 'io.selendroid.testapp:0.10.0'}

self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
time.sleep(5)

def tearDown(self):

self.driver.quit()

def testxiadan01(self):
driver = self.driver
driver.find_elements_by_class_name("android.widget.TextView")[11].click()
time.sleep(2)
driver.find_elements_by_class_name("android.widget.TextView")[5].click()
driver.find_element_by_name("下单").click()

if name == 'main':
suite = unittest.TestLoader().loadTestsFromTestCase(mytest)
unittest.TextTestRunner(verbosity=2).run(suite)

#1 楼 @lihuazhang 代码贴了哦,忘了点击回复您了。

@gaoxing200851 你好,请问你这个问题解决了吗?我遇到了和你一样的问题?

#4 楼 @930304061 我是因为写错了啊。

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