improve TMWebDriver connection error message and SOP

This commit is contained in:
Liang Jiaqing committed 2026-04-29 14:02:43 +08:00
1 parent 3da34d2f58
commit 564f05aeee
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -243,7 +243,9 @@ class TMWebDriver:
return rr
def _remote_cmd(self, cmd):
return requests.post(self.remote, headers={"Content-Type": "application/json"}, json=cmd).json()
try: return requests.post(self.remote, headers={"Content-Type": "application/json"}, json=cmd).json()
except (ConnectionError, requests.exceptions.ConnectionError):
raise ConnectionError("TMWebDriver master未运行,看tmwebdriver_sop启动master")
def get_all_sessions(self):
if self.is_remote: