Appium [求助] 各位大神们,请问,用 appium 如何开启 / 关闭蓝牙

songer · 2017年05月11日 · 最后由 blackit520 回复于 2019年02月26日 · 2893 次阅读

setConnection()接口只提供了 wifi、data、airplane 的设置,没有直接提供蓝牙相关设置,我翻了 api 也没找到?请问大家有什么解决之法?

共收到 8 条回复 时间 点赞

直接界面上点击开启关闭蓝牙的按钮不完了吗

不用都通过 appium 来解决 找到关闭蓝牙的命令单独调用即可

bauul 回复

先试试能不能有其他的办法,实在不行只能 tap,不同手机,点击位置不同,所以逼不得已不想用这个方法

我正在试 adb 相关命令,appium 就没有相关接口吗

songer 回复

做的是什么产品,如果是手机的话,可以直接问开发吧,他们应该有这样的命令

songer 回复

开启 BT on a rooted device
adb shell service call bluetooth_manager 8

你好,作者,之前就看到您有一个帖子是关于 uiautomator2 的问题,如下
[ADB] No io.appium.uiautomator2.server process found to kill, continuing...
[UiAutomator2] Starting uiautomator2 server v0.0.8 with cmd: am,instrument,-w,io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner
[UiAutomator2] running command...
adb -s 4NT7N17406015564 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner...
[UiAutomator2] Waiting for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: Error: Trying to proxy a session command without session id
您说你已经解决了,但并没有说明原因,我也遇到了。请问您一下具体的原因和解决办法,谢谢。因为那个帖子已经被关闭了,所以只能到这里来询问了,谢谢。我的 qq 435171234

a1l9e8x6 回复

你好,请问这个问题你解决了吗?

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