python写安卓app控制蓝牙_请问大神,appium 如何控制开启和关闭 android 手机的蓝牙功能...

info: --> POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/network_connection {"type":2}

info: Setting network connection

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "settings put global airplane_mode_on 0"

info: [debug] Stopping logcat capture

info: [debug] Logcat terminated with code null, signal SIGTERM

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 kill-server

error: Unhandled error: Error: read ECONNRESET

at errnoException (net.js:905:11)

at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {"desiredCapabilities":{"app":"C:/Appium_Script/iceboxcontrol/IceBoxControl_CHiQ1U_debug.apk","

appActivity":"com.iceboxcontrol.activitys.LoginActivity","appPackage":"com.iceboxcontrol","platformName":]

info: [debug] UiAutomator exited

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

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 wait-for-device

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "echo 'ready'"

info: [debug] Starting logcat capture

info: [debug] Forwarding system:4724 to device:4724

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 forward tcp:4724 tcp:4724

info: Starting App

info: [debug] Attempting to kill all 'uiautomator' processes

info: [debug] Getting all processes with 'uiautomator'

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "ps 'uiautomator'"

info: [debug] No matching processes found

info: [debug] Running bootstrap

info: [debug] spawning: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.and

roid.bootstrap.Bootstrap -e pkg com.iceboxcontrol -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] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]

info: [debug] [BOOTSTRAP] [debug] json loading complete.

info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.

info: [debug] [BOOTSTRAP] [debug] Client connected

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] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "am broadcast -a android.intent.action.AIRPLANE_MOD

E --ez state false"

info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}

info: [debug] Stopping logcat capture

info: [debug] Logcat terminated with code null, signal SIGTERM

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 kill-server

error: Unhandled error: Error: read ECONNRESET

at errnoException (net.js:905:11)

at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {"desiredCapabilities":{"app":"C:/Appium_Script/iceboxcontrol/IceBoxControl_CHiQ1U_debug.apk","

appActivity":"com.iceboxcontrol.activitys.LoginActivity","appPackage":"com.iceboxcontrol","platformName":]

info: [debug] UiAutomator exited

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

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 wait-for-device

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "echo 'ready'"

info: [debug] Starting logcat capture

info: [debug] Forwarding system:4724 to device:4724

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 forward tcp:4724 tcp:4724

info: Starting App

info: [debug] Attempting to kill all 'uiautomator' processes

info: [debug] Getting all processes with 'uiautomator'

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "ps 'uiautomator'"

info: [debug] No matching processes found

info: [debug] Running bootstrap

info: [debug] spawning: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.and

roid.bootstrap.Bootstrap -e pkg com.iceboxcontrol -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] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]

info: [debug] [BOOTSTRAP] [debug] json loading complete.

info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.

info: [debug] [BOOTSTRAP] [debug] Client connected

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] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "am start -n io.appium.settings/.Settings -e wifi o

n -e data off"

info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}

info: [debug] Stopping logcat capture

info: [debug] Logcat terminated with code null, signal SIGTERM

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 kill-server

error: Unhandled error: Error: read ECONNRESET

at errnoException (net.js:905:11)

at TCP.onread (net.js:559:19) context: [POST /wd/hub/session {"desiredCapabilities":{"app":"C:/Appium_Script/iceboxcontrol/IceBoxControl_CHiQ1U_debug.apk","

appActivity":"com.iceboxcontrol.activitys.LoginActivity","appPackage":"com.iceboxcontrol","platformName":]

info: [debug] UiAutomator exited

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

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 wait-for-device

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "echo 'ready'"

info: [debug] Starting logcat capture

info: [debug] Forwarding system:4724 to device:4724

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 forward tcp:4724 tcp:4724

info: Starting App

info: [debug] Attempting to kill all 'uiautomator' processes

info: [debug] Getting all processes with 'uiautomator'

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "ps 'uiautomator'"

info: [debug] No matching processes found

info: [debug] Running bootstrap

info: [debug] spawning: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.and

roid.bootstrap.Bootstrap -e pkg com.iceboxcontrol -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] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]

info: [debug] [BOOTSTRAP] [debug] json loading complete.

info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.

info: [debug] [BOOTSTRAP] [debug] Client connected

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: {"value":false,"status":0}

info: Getting network connection

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "settings get global airplane_mode_on"

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "settings get global wifi_on"

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "settings get global mobile_data"

info: [debug] Responding to client with success: {"status":0,"value":6,"sessionId":"72a9a501-64e9-4def-a64f-9266d6aa121b"}

info: <-- POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/network_connection 200 24747.456 ms - 73 {"status":0,"value":6,"sessionId":"72a9a501-64e9-4d

ef-a64f-9266d6aa121b"}

info: --> POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/appium/device/start_activity {"appPackage":"com.iceboxcontrol","appActivity":"com.iceboxcont

rol.activitys.LoginActivity","appWaitPackage":"","appWaitActivity":""}

info: [debug] Getting device API level

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "getprop ro.build.version.sdk"

info: [debug] Device is at API Level 19

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "am start -S -n com.iceboxcontrol/com.iceboxcontrol

.activitys.LoginActivity"

info: [debug] Responding to client with success: {"status":0,"value":"Successfully launched the app.","sessionId":"72a9a501-64e9-4def-a64f-9266d6aa121b"}

info: <-- POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/appium/device/start_activity 200 1522.236 ms - 104 {"status":0,"value":"Successfully launche

d the app.","sessionId":"72a9a501-64e9-4def-a64f-9266d6aa121b"}

info: --> POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/element/3/click {}

info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"3"}]

info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"3"}}

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":"72a9a501-64e9-4def-a64f-9266d6aa121b"}

info: <-- POST /wd/hub/session/72a9a501-64e9-4def-a64f-9266d6aa121b/element/3/click 500 30.234 ms - 182

info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION

info: [debug] [BOOTSTRAP] [debug] Got command action: click

info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"Unknown error","status":13}

info: [debug] [BOOTSTRAP] [debug] Emitting system alert message

info: [debug] Emitting alert message...

info: [debug] [BOOTSTRAP] [debug] Emitting system alert message

info: [debug] Emitting alert message...

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: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "input keyevent 3"

info: [debug] Resetting IME to 'com.iflytek.inputmethod/.FlyIME'

info: [debug] executing cmd: E:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe -s 274b3f06 shell "ime set com.iflytek.inputmethod/.FlyIME"

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: {"value":"OK, shutting down","status":0}

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: 67.984

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] We shut down because no new commands came in

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值