android 6.0 乱码,windows+python3+appium1.4.16+android6.0,appium server 中文显示乱码求解?...

例如,我通过 xpath 查找这个元素:self.el.get_xpath("//android.widget.CheckedTextView[@text='成员管理']")

在 appium--server 输出结果:

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

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

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

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

info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"2ccceab6-d086-4394-a095-ab2e7d9efd0e"}

info:

info: --> POST /wd/hub/session/2ccceab6-d086-4394-a095-ab2e7d9efd0e/element {"using":"xpath","value":"//android.widget.TextView[@text='鑼冨畞瀹?]","sessionId":"2ccceab6-d086-4394-a095-ab2e7d9efd0e"}

info: [debug] Waiting up to 5000ms for condition

info: [debug] Pushing command to appium work queue: ["find",{"strategy":"xpath","selector":"//android.widget.TextView[@text='鑼冨畞瀹?]","context":"","multiple":false}]

info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//android.widget.TextView[@text='鑼冨畞瀹?]","context":"","multiple":false}}

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

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

info: [debug] [BOOTSTRAP] [debug] Finding //android.widget.TextView[@text='鑼冨畞瀹?] using XPATH with the contextId: multiple: false

都是 xpath 的位置,有中文就显示论码。

我的 pycharm 设置的是 utf-8。

我的代码开头也用 # coding=utf-8 说明。

因为怕后面出现问题,所以代码中的每个输出的地方,我还是 print(u"...") 表示了。

剩下疑问:

appium-server 的设置中有什么要设置中文的地方吗?

安卓手机端有什么需要设置中文的地方吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值