import subprocess, sys, time
session, model, output = sys.argv[1:]
def run(*args):
    result = subprocess.run(['agent-device',*args,'--session',session],check=True,capture_output=True,text=True)
    print(result.stdout)
    return result
run('record','start',output)
time.sleep(1)
run('gesture','pan','540','1359','1','0','200')
time.sleep(2)
# Both sides get the same short scrolls so Android emits frames after the tap.
run('scroll','down','0.12','--settle')
run('scroll','up','0.12','--settle')
time.sleep(1)
run('record','stop')
