Fix stale final screenshot export
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import base64
|
||||
import asyncio
|
||||
import json
|
||||
import re
|
||||
@@ -531,6 +532,10 @@ async def main() -> None:
|
||||
json.dumps(ctx.measurement, ensure_ascii=False, indent=2),
|
||||
encoding='utf-8',
|
||||
)
|
||||
if ctx.screenshot_b64:
|
||||
screenshot_bytes = base64.b64decode(ctx.screenshot_b64)
|
||||
(out_dir / 'final-screenshot-current.png').write_bytes(screenshot_bytes)
|
||||
(out_dir / 'final-screenshot.png').write_bytes(screenshot_bytes)
|
||||
(out_dir / 'context.json').write_text(
|
||||
ctx.model_dump_json(indent=2, exclude={'screenshot_b64', 'rendered_html'}),
|
||||
encoding='utf-8',
|
||||
|
||||
Reference in New Issue
Block a user