Poco icon indicating copy to clipboard operation
Poco copied to clipboard

Airtest ide连接iOS模拟器时没有自动安装PocoService 和Yosemite,有关输入的功能没办法跑,请问需要怎么解决

Open appp-deng opened this issue 5 years ago • 7 comments

appp-deng avatar Jul 25 '19 03:07 appp-deng

pocoservice和yosemite都是安卓下的 请具体描述你遇到的问题,贴出具体报错

yimelia avatar Jul 25 '19 06:07 yimelia

pocoservice和yosemite都是安卓下的 请具体描述你遇到的问题,贴出具体报错 就运行poco("TextField").set_text(“1234”)时无法写入,是iOS不能用set_text()吗? Traceback (most recent call last): File "/Users/wjjn3033/dev/idestable/airtest/airtest/cli/runner.py", line 65, in runTest File "/Users/wjjn3033/dev/idestable/venv_ide_qt511/lib/python3.6/site-packages/six.py", line 693, in reraise File "/Users/wjjn3033/dev/idestable/airtest/airtest/cli/runner.py", line 61, in runTest File "/Users/gaokaozhitongche/test/login.air/login.py", line 13, in poco("TextField").set_text("18826054808") File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 802, in set_text return self.setattr('text', text) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 39, in wrapped return func(self, *args, **kwargs) File "/Applications/AirtestIDE.app/Contents/MacOS/poco/proxy.py", line 761, in setattr raise InvalidOperationException('"{}" of "{}"'.format(str(e), self)) poco.exceptions.InvalidOperationException: "Unable to set attribute "text" of node "{'name': 'TextField', 'payload': {'isEnabled': '1', 'label': '', 'type': 'TextField', 'identifier': '', 'name': 'TextField', 'size': [0.855072463768116, 0.0625], 'pos': [0.5, 0.26450892857142855], 'zOrders': {'local': 0, 'global': 0}, 'anchorPoint': [0.5, 0.5], 'visible': True}, 'parent': <poco.freezeui.hierarchy.Node object at 0x1185f3f98>}"." of "UIObjectProxy of "TextField""

appp-deng avatar Jul 25 '19 06:07 appp-deng

我随意打开了一个iOS模拟器,型号是 iOS simulator 6s (12.2),在Safari浏览器输入,我这边可以正常运行哦 你是在什么app上试的呢?有在别的地方试过输入吗? image

EraChen233 avatar Jul 25 '19 06:07 EraChen233

@EraChen233 我在走登录流程,需要输入账号和密码,在Android跑的时候用的是poco(name).set_text(),但是iOS好像不能这样用,还有看您的示例是直接text(),不用先定位吗?

appp-deng avatar Jul 25 '19 07:07 appp-deng

这是个bug,先用airtest的text()方法替代一下吧

EraChen233 avatar Jul 25 '19 07:07 EraChen233

@yimelia 请问下这个BUG有排期修复吗?目前最新的版本1.0.87还没修复~~ 另:iOS下get_text都是空的,取而代之的是value属性,iOS版本:14.7.1 1350c3b1d1c903f950e1a1fa966ada3d

bingosam avatar May 19 '22 11:05 bingosam

2023年了,催一下,wda都实现了set_text,为什么poco不能实现的呢

Ryaningli avatar Aug 10 '23 12:08 Ryaningli