老师你好 我在执行多线程启动时总会有设备卡死 日志如下 请教老师该如何解决

来源:3-5 多线程的初级使用

慕盖茨8197298

2019-11-20

老师你好 我在执行多线程启动时总会有设备卡死 日志如下 请教老师该如何解决
Chromedriver: [STDOUT] Starting ChromeDriver 2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7) on port 9511
Only local connections are allowed.
info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9511/wd/hub/status] with no body
info: JSONWP Proxy: Got response with status 200: {“sessionId”:"",“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Windows NT”,“version”:“10.0.14393”}}}
info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9511/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.tencent.mm”,“androidUseRunningApp”:true,“androidProcess”:“com.tencent.mm:tools”,“androidDeviceSerial”:“760BBL46767I”}}}
info: JSONWP Proxy: Got response with status 200: {“sessionId”:“254f601ae7fc1a29c55c5fc63c374995”,“status”:0,“value”:{“acceptInsecureCerts”:false,“acceptSslCerts”:false,“applicationCacheEnabled”:false,“browserConnectionEnabled”:false,“browserName”:“c…
info: Chromedriver: Changed state to 'online’
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: <-- POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/context 200 4018.224 ms - 76 {“status”:0,“value”:null,“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: --> POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/element {“using”:“xpath”,“value”:”//[@id=“360”]/div[2]/span",“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/element] to [POST http://127.0.0.1:9511/wd/hub/session/254f601ae7fc1a29c55c5fc63c374995/element] with body: {“using”:“xpath”,“value”:"//
[@id=“360”]/div[2]/span",“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: [debug] Didn’t get a new command in 60 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools\adb.exe -s 760BBL46767I shell “input keyevent 3"
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Stopping chromedriver for context WEBVIEW_com.tencent.mm:tools
info: Chromedriver: Changed state to 'stopping’
info: JSONWP Proxy: Proxying [DELETE /] to [DELETE http://127.0.0.1:9511/wd/hub/session/254f601ae7fc1a29c55c5fc63c374995] with no body
info: JSONWP Proxy: Got response with status 200: {“sessionId”:“254f601ae7fc1a29c55c5fc63c374995”,“status”:7,“value”:{“message”:“no such element: Unable to locate element: {“method”:“xpath”,“selector”:”//[@id=“360”]/div[2]/span"}\n (Sessi…
info: JSONWP Proxy: Replacing sessionId 254f601ae7fc1a29c55c5fc63c374995 with 5816b3c3-11f1-4164-9e77-b98209cceed5
info: <-- POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/element 200 173956.569 ms - 361
info: JSONWP Proxy: Got response with status 200: {“sessionId”:“254f601ae7fc1a29c55c5fc63c374995”,“status”:0,“value”:null}
info: --> POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/element {“using”:“xpath”,“value”:"//
[@id=“baidu”]/div[2]/img[3]”,“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: JSONWP Proxy: Proxying [POST /wd/hub/session/5816b3c3-11f1-4164-9e77-b98209cceed5/element] to [POST http://127.0.0.1:9511/wd/hub/session/254f601ae7fc1a29c55c5fc63c374995/element] with body: {“using”:“xpath”,“value”:"//*[@id=“baidu”]/div[2]/img[3]",“sessionId”:“5816b3c3-11f1-4164-9e77-b98209cceed5”}
info: Chromedriver: Changed state to 'stopped’
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] Sent shutdown command, waiting for UiAutomator to stop…
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: 5428.483
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] We shut down because no new commands came in
error: Could not proxy command to remote server. Original error: connect ECONNREFUSED 127.0.0.1:9511

写回答

1回答

Mushishi

2019-11-20

你为啥只启了一个进程 就是我们appium服务

0
4
Mushishi
回复
慕盖茨8197298
这里指定 你需要根据你的进程个数启动多个,
2019-11-23
共4条回复

Python主讲移动端自动化测试框架Appium

APP自动化基础知识、po模型、关键字模型、服务自动化、持续集成

1508 学习 · 1333 问题

查看课程