不知道大家用Python+uiautomator2+weditor在做UI自动化的时候打开有没有遇到过类似的错误
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
在weditor上表现为:
在dos窗口为:
问题解决
这是因为ATX的服务停止了:
但是奇怪的是在ATX并没有开启服务的按钮,这个时候我们需要用adb命令进入手机,手动开启服务
第一步:确保手机连接
adb devices
第二部:进入手机
adb shell
第三步:开启服务
/data/local/tmp/atx-agent server -d