AirtestProject / iOS-Tagent

iOS support agent for automation
http://airtest.netease.com/
Other
654 stars 178 forks source link

ios 真机上, 拖拽控件失败 assert w >= x >= 0 AssertionError #64

Open rere332 opened 5 years ago

rere332 commented 5 years ago

运行 code : poco("DDMultiSelect").child("DraggableObject(Clone)")[0].child("Image").swipe([0.2852, 0.2773]) poco("DDMultiSelect").child("DraggableObject(Clone)").child('Image').drag_to(poco("DDMultiSelect").child("DropZone"))


上面两段code, 元素都在, 在ios真机上拖拽失败, 报错, 全部都是wda里面assert失败

File "/Test/iOS/iOSBase.py", line 39, in set_up poco("DDMultiSelect").child("DraggableObject(Clone)")[0].child("Image").swipe([0.2852, 0.2773]) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/proxy.py", line 23, in wrapped return func(proxy, *args, *kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/proxy.py", line 459, in swipe ret = self.poco.swipe(origin, direction=dir_vec, duration=duration) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/pocofw.py", line 305, in swipe return self.agent.input.swipe(p1[0], p1[1], p2[0], p2[1], duration) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/utils/airtest/input.py", line 74, in swipe swipe(p1, vector=direction, duration=duration, steps=steps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airtest/utils/logwraper.py", line 72, in wrapper res = f(args, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airtest/core/api.py", line 322, in swipe G.DEVICE.swipe(pos1, pos2, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airtest/core/ios/ios.py", line 238, in swipe tx self._touch_factor, ty self._touch_factor, duration) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wda/init.py", line 557, in swipe x1, y1 = self._percent2pos(x1, y1, size) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wda/init.py", line 505, in _percent2pos assert w >= x >= 0 AssertionError

@EraChen233 能帮忙看下吗? 同样的code, 在安卓上是可以运行的

EraChen233 commented 5 years ago

swipe 语句,在iOS上重新录制一遍

rere332 commented 5 years ago

swipe 语句,在iOS上重新录制一遍

用录出来的code ,也是不行, 还是报错。。 并且airtest ide 目前run 不了UnityPoco 的代码(这个问题已经有人报过了)

poco("DDMultiSelect").child("DraggableObject(Clone)")[0].child("Image").swipe([0.2852, 0.2773]) 这个就是之前我用ide录出来的, 到了python 里面执行, 还是一样的错误

EraChen233 commented 5 years ago

你的facebook-wda 版本是多少?pip list 可以查看 我这边是 0.2.1,试一下重新安装 facebook-wda pip install facebook-wda==0.2.1

image