| 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: |