Open Pitiedwzr opened 1 year ago
device.stop()
并不需要每次tap之后都调用@williamfzc ,尊敬的开发者,你好,我们也是在模拟器上进行测试遇到了类似的问题:
Type A touch device androVM Virtual Input (1600x900 with 2 contacts) detected on /dev/input/event4 (score 11200)
binding socket: Address already in use
Unable to start server on minitouch
Traceback (most recent call last):
File "D:\Program\**********\lab\test_pyminitouch.py", line 54, in <module>
main()
File "D:\Program\**********\lab\test_pyminitouch.py", line 42, in main
device = MNTDevice("emulator-5554")
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\**********\mambaforge\envs\conda-general\Lib\site-packages\pyminitouch\actions.py", line 117, in __init__
self.start()
File "C:\Users\**********\mambaforge\envs\conda-general\Lib\site-packages\pyminitouch\actions.py", line 125, in start
self.server = MNTServer(self.device_id)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\**********\mambaforge\envs\conda-general\Lib\site-packages\pyminitouch\connection.py", line 102, in __init__
assert (
AssertionError: minitouch did not work. see https://github.com/williamfzc/pyminitouch/issues/11
Process finished with exit code 1
经过探索,我们发现:这是由于在测试脚本执行完毕后,/data/local/tmp/minitouch
进程仍然驻留造成的;请问,对于这种情况,有什么比较好的解决办法吗?
期待您的回复!
@songyuc 可以在执行完毕时尝试利用adb把进程杀掉,如果进程没有正常结束的话
@williamfzc ,您好,请问一下,您在实机测试中使用pyminitouch
时,遇到过“minitouch”进程没有正常退出的情况吗?
@williamfzc ,您好,请问一下,您在实机测试中使用
pyminitouch
时,遇到过“minitouch”进程没有正常退出的情况吗?
没有。但我个人的样本量不大,不好做参考
没有。但我个人的样本量不大,不好做参考
好的,感谢您的回复!
@williamfzc,您好,我看到您在首页文档中引用的minitouch,仍然是旧版的openstf/minitouch;
我们在讨论时想到,这个问题会不会是因为pyminitouch
的预编译包使用旧版本,才会出现的呢
@williamfzc,您好,我看到您在首页文档中引用的minitouch,仍然是旧版的openstf/minitouch; 我们在讨论时想到,这个问题会不会是因为
pyminitouch
的预编译包使用旧版本,才会出现的呢
看了一下新版本只是换到了openstf namespace下,并没有对代码有什么改动的样子,可能影响不大。 当然也可能跟预编译包有关,亦可选择自行为你们的设备编译特定的版本。
我也留意到官方似乎并不打算原生支持 10+ 的版本,也可能与之后的安全策略有关系。 https://github.com/DeviceFarmer/minitouch#for-android-10-and-up
@williamfzc,感谢您的解答!
还想请教一下,如果想在pyminitouch
中配置为所需的设备编译特定的版本,这边有具体的实施步骤吗
@williamfzc,感谢您的解答! 还想请教一下,如果想在
pyminitouch
中配置为所需的设备编译特定的版本,这边有具体的实施步骤吗
https://github.com/williamfzc/pyminitouch/blob/master/pyminitouch/connection.py
提前把预编译好的minitouch推进设备,让他自动跳过下载的步骤即可
@williamfzc 感谢您的回复,我们学习一下您的代码~
IDE报:
按照https://github.com/williamfzc/pyminitouch/issues/11 的解法,每次执行程序前都已重启ADB服务器:
每次点击完成后都会执行
device.stop()
问题依旧未解决,第一次执行程序不会出现问题,之后会一直出现,重启模拟器后依旧仅第一次能够不出问题
没有安装uiautomator或者airtest
大佬看一下还有解吗,辛苦了