MCPcopy Create free account
hub / github.com/a943512/PyAibote / WindowsDriverStart

Method WindowsDriverStart

PyAibote/Tool/DebugStartDriver.py:38–58  ·  view source on GitHub ↗
(self, IP, Port)

Source from the content-addressed store, hash-verified

36
37 @classmethod
38 def WindowsDriverStart(self, IP, Port) -> None:
39 try:
40 system_info = platform.system()
41 if system_info == "Windows":
42 DriverName = "WindowsDriver.exe"
43 version_info = platform.version()
44 major_version = int(version_info.split('.')[0])
45 if major_version < 10:
46 DriverName = "WindowsDriver_win7.exe"
47 print("Debug Model Start WinDriver ...")
48 args = {
49 "Action": "Authentication",
50 "Data": {
51 "Token": "PyAibote",
52 }
53 }
54 os.popen(f"{DriverName} 127.0.0.1 {Port} {args}")
55 print("Start WinDriver Successful,Execute Script")
56 except FileNotFoundError as e:
57 err_msg = "\nStart local WinDriver.exe fail Exception elimination step:\n1. Check WebDriver.exe Path;\n2. WebDriver.exe Add to system environment variable?"
58 self.error(f"{err_msg}: " + str(e))
59
60 @classmethod
61 def DigtalHumanDriverStart(self, IP, Port) -> None:

Callers 1

executeMethod · 0.80

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected