Merge branch 'main' into zdy
This commit is contained in:
@@ -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.
|
||||
@@ -250,6 +257,19 @@ class PythonController:
|
||||
logger.error("Failed to get window size. Status code: %d", response.status_code)
|
||||
return None
|
||||
|
||||
def get_vm_wallpaper(self):
|
||||
"""
|
||||
Gets the wallpaper of the vm.
|
||||
"""
|
||||
response = requests.post(self.http_server + "/wallpaper")
|
||||
if response.status_code == 200:
|
||||
logger.info("Wallpaper downloaded successfully")
|
||||
return response.content
|
||||
else:
|
||||
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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user