Take a screenshot during dragging in Appium

I’m trying to take a screen shot while the drag action is still taking place.

action = TouchAction(context.driver).press(500, 1100).wait(ms=4000).move_to(x=500, y=500).perform()
context.driver.save_screenshot(screenshot_path)
action.release().perform()

But this doesn’t work. Any help would be appreciated

Thanks

This is not possible. Appium server puts all commands into a queue and they cannot run in parallel. As a possible workaround you could try to record a video and then extract your screenshot(s) from there.