From fb9d9f8ac6b1b58667d20f5542f77f83d784a2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=9C=A3=E7=BF=94=C2=B2=E2=81=B0=E2=82=82?= =?UTF-8?q?=E2=82=81?= Date: Fri, 30 Aug 2024 18:11:42 +0800 Subject: [PATCH] add stop for watcher, close #812 --- uiautomator2/watcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uiautomator2/watcher.py b/uiautomator2/watcher.py index aec1aec1..e9e36e81 100644 --- a/uiautomator2/watcher.py +++ b/uiautomator2/watcher.py @@ -132,6 +132,10 @@ def stop(self): self.__stop.set() self.__stopped.wait(timeout=10) self.__started = False + + def close(self): + """ alias of stop """ + self.stop() def __enter__(self): return self