microsoft / WinAppDriver

Windows Application Driver
MIT License
3.69k stars 1.4k forks source link

driver.start_recording_screen not working with error : "status":9,"value":{"error":"unknown command","message":"Command not recognized} #1807

Open dimag25 opened 2 years ago

dimag25 commented 2 years ago

Hello, I'm trying to perform a screen record video with the appium driver, and got the following error:

self = <appium.webdriver.errorhandler.MobileErrorHandler object at 0x7ff7717c7c40>
response = {'status': 404, 'value': '{"status":9,"value":{"error":"unknown command","message":"Command not recognized: POST: /session/FA31EAB6-6D10-4777-8C99-51DEAD3FA8E5/appium/start_recording_screen"}}'}

my stack and versions: WindowApplicationDriver==1.2.1 Appium-python-client == 2.2.0 Selenium == 3.4.1 Mac Os

im using the following driver code:

desired_caps = {}
desired_caps["appTopLevelWindow"] = hex(int(newWindowHandle))
desired_caps["platformName"] = "Windows"
desired_caps["deviceName"] = vm_name
driver = webdriver.Remote(WindowsApplicationDriverUrl, desired_caps)

start recording failure appears in this line: driver.start_recording_screen()

any help?

anunay1 commented 2 years ago

it's not supported.

liljohnak commented 2 years ago

We're using this in our mstestv2 solution. https://ffmpeg.org/ Works well, also provides flexibility to add log files to video. Very handy to debug processes when video has the debug logs.

dimag25 commented 2 years ago

@liljohnak thanks, we are using pytest with python3, is this tool working only with mstest?

anunay1 commented 2 years ago

Check this https://pythonprogramming.altervista.org/record-the-screen-with-ffmpeg-and-python/

dimag25 commented 2 years ago

thanks!