Make up missing getters and metrics; Update VLC scripts; Start to work on Chrome, update examples instructions

This commit is contained in:
Timothyxxx
2024-01-11 21:27:40 +08:00
parent b20027884a
commit 820579a5a2
15 changed files with 249 additions and 160 deletions

View File

@@ -228,6 +228,13 @@ class PythonController:
else:
raise Exception(f"Unknown action type: {action_type}")
# Additional info
def get_vm_platform(self):
"""
Gets the size of the vm screen.
"""
return self.execute_python_command("import platform; print(platform.system())")['output'].strip()
def get_vm_screen_size(self):
"""
Gets the size of the vm screen.
@@ -262,6 +269,7 @@ class PythonController:
logger.error("Failed to get wallpaper. Status code: %d", response.status_code)
return None
# VLC
def get_vlc_status(self, host='localhost', port=8080, password='password'):
url = f'http://{host}:{port}/requests/status.xml'