Open Ives236 opened 4 months ago
描述问题bug 连接设备后调用disconnect方法后依然可以对设备进行操作 看日志是已经执行了 [16:21:01][DEBUG] [javacap_sever]b'' [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 forward --remove tcp:18103 [16:21:01][DEBUG] javacap stream ends [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell wm size [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.sf.lcd_density [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger [16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getevent -p [16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.product.cpu.abi [16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.build.version.sdk [16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell ls -l /data/local/tmp/minitouch [16:21:02][DEBUG] install_minitouch skipped [16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 forward --no-rebind tcp:19522 localabstract:minitouch_19522 [16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell /data/local/tmp/minitouch -n 'minitouch_19522' 2>&1 [16:21:02][DEBUG] [minitouch_server]b'Type A touch device vInput_aH4n (720x1280 with 5 contacts) detected on /dev/input/event306 (score 20960)' [16:21:02][DEBUG] minitouch header:b'v 1\n^ 5 720 1280 0\n$ 39190\n' [16:21:02][DEBUG] [minitouch_server]b'Connection established'
(在这里粘贴traceback或其他报错信息)
相关截图 (贴出遇到问题时的截图内容,如果有的话)
from airtest.core.api import *
address = '127.0.0.1:1234' current_device = connect_device('Android:////{}?cap_method=JAVACAP&&ori_method=ADBORI'.format(address)) print('current_device:', current_device) print(dir(current_device))
print('===========开始 断连设备============') current_device.disconnect() print('===========断连设备 结束============') sleep(10) print(current_device) touch(v=(10, 10))
预期效果 (预期想要得到什么、见到什么) 调用disconnect方法后无法对设备无法操作
python 版本: python3.12
python3.12
airtest 版本: 1.3.3
1.3.3
airtest版本通过pip freeze可以命令可以查到
pip freeze
设备: Android操作系统的模拟器
描述问题bug 连接设备后调用disconnect方法后依然可以对设备进行操作 看日志是已经执行了 [16:21:01][DEBUG] [javacap_sever]b''
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 forward --remove tcp:18103
[16:21:01][DEBUG] javacap stream ends
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell wm size
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.sf.lcd_density
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell dumpsys SurfaceFlinger
[16:21:01][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getevent -p
[16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.product.cpu.abi
[16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell getprop ro.build.version.sdk
[16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell ls -l /data/local/tmp/minitouch
[16:21:02][DEBUG] install_minitouch skipped
[16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 forward --no-rebind tcp:19522 localabstract:minitouch_19522
[16:21:02][DEBUG] /python3.12/site-packages/airtest/core/android/static/adb/mac/adb -s 127.0.0.1:1234 shell /data/local/tmp/minitouch -n 'minitouch_19522' 2>&1
[16:21:02][DEBUG] [minitouch_server]b'Type A touch device vInput_aH4n (720x1280 with 5 contacts) detected on /dev/input/event306 (score 20960)'
[16:21:02][DEBUG] minitouch header:b'v 1\n^ 5 720 1280 0\n$ 39190\n'
[16:21:02][DEBUG] [minitouch_server]b'Connection established'
相关截图 (贴出遇到问题时的截图内容,如果有的话)
from airtest.core.api import *
address = '127.0.0.1:1234' current_device = connect_device('Android:////{}?cap_method=JAVACAP&&ori_method=ADBORI'.format(address)) print('current_device:', current_device) print(dir(current_device))
print('===========开始 断连设备============') current_device.disconnect() print('===========断连设备 结束============') sleep(10) print(current_device) touch(v=(10, 10))
预期效果 (预期想要得到什么、见到什么) 调用disconnect方法后无法对设备无法操作
python 版本:
python3.12
airtest 版本:
1.3.3
设备: Android操作系统的模拟器