AirtestProject / AirtestProject/iOS-Tagent

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

Offen
#64 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Objective-C
Sterne
722
Forks
194
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

运行 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, 在安卓上是可以运行的

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.