报错日志主要集中在三处
__init__.py,in line 613,in swipePoints
__init__.py,in line 428,in wrapper return _method_obj(*args,**kwargs)
__init__.py,in line 138,in __call__
源码就3行
from uiautomator import device as d
points=[(11,11),(22,22)]
d.swipePoint(points,100)
用python+uiautomator做自动化,使用到swipePoints这个方法的时候,一直报KeyError错误,请问怎么解决?
答案:3 悬赏:0 手机版
解决时间 2021-03-02 00:58
- 提问者网友:心如荒岛囚我终老
- 2021-03-01 07:37
最佳答案
- 五星知识达人网友:胯下狙击手
- 2021-03-01 07:58
调用 uiautomator 模块的device 类的swipePoint方法出错。
全部回答
- 1楼网友:野慌
- 2021-03-01 09:23
Pre-requirements
Install Android SDK, and set ANDROID_HOME environment to the correct path.
Enable ADB setting on device and connect your android device using usb with your PC.
Allow apps to install from unknown sources on device settings.
uiautomator
- 2楼网友:刀戟声无边
- 2021-03-01 09:16
估计调用swipePoints传参有问题
再看看别人怎么说的。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯