fix: remove non-functional save_recording_path parameter
- Remove save_recording_path field from BrowserProfile class
- Remove documentation for save_recording_path parameter
- Add migration note directing users to use record_video_dir instead
The save_recording_path parameter was defined in BrowserProfile but never actually
processed by the browser launch methods. Users should use the standard Playwright
record_video_dir parameter instead, which is properly implemented and functional.
Fixes user reports of video recording not working when using save_recording_path.
- Applied automated linting suggestions from pre-commit hooks, primarily updating type hints (e.g., Dict -> dict) and organizing imports.
- Refactored Playwright script execution in examples/features/playwright_script_generation.py to use asyncio.create_subprocess_exec for asynchronous handling and real-time log streaming, resolving ASYNC221 lint error and improving output visibility.
Implement the ability to generate executable Playwright scripts from an Agent's run history (`AgentHistoryList`).
This introduces the `PlaywrightScriptGenerator` class which translates recorded agent actions (clicks, inputs, navigation, etc.) into a Python script using Playwright's async API.
Key features:
- Uses XPath selectors derived from the agent's interaction history.
- Includes a robust helper function (`_try_locate_and_act`) with XPath prefix trimming for improved resilience on dynamic pages.
- Handles sensitive data placeholders by mapping them to environment variables in the generated script.
- Supports configuring the browser launch and context based on the original agent's `BrowserConfig` and `BrowserContextConfig`.
- Activated by setting the `save_playwright_script_path` option in `AgentSettings`.
Includes modifications to `Agent` service to trigger generation and `AgentHistoryList` view to add the saving method. Also adds a new example (`examples/features/playwright_script_generation.py`).
This feature enables reliable replay of agent runs, automated testing, and scripting of repetitive tasks discovered by the agent.