Stealth browser automation for AI agents over MCP and the Chrome DevTools Protocol: navigation, network hooks, DOM extraction, and pixel-accurate UI cloning.
Python ai-agent-toolsai-toolsanthropicanti-bot-bypassautomation-toolsbrowser-automationchrome-devtoolsclaude-mcpcloudflare-bypassdeveloper-toolsfastmcpmcp-servermodel-context-protocolnetwork-interceptionnodriverpythonstealth-browserundetectable-browserweb-automationweb-scraping
fix(file_based_element_cloner): default output_dir to absolute project_root path
Atsu1979d9693144d57e
diff --git a/src/file_based_element_cloner.py b/src/file_based_element_cloner.pyindex bf46a13..ade5d38 100644--- a/src/file_based_element_cloner.py+++ b/src/file_based_element_cloner.py@@ -21,15 +21,20 @@ from element_cloner import element_clonerclass FileBasedElementCloner:"""Element cloner that saves data to files and returns file paths."""- def __init__(self, output_dir: str = "element_clones"):+ def __init__(self, output_dir: Optional[str] = None):"""Initialize with output directory for clone files.Args:- output_dir (str): Directory to save clone files.+ output_dir (str | None): Directory to save clone files.+ Defaults to <project_root>/element_clones (absolute path,+ avoids cwd-dependent failures when launched from Claude Desktop)."""- self.output_dir = Path(output_dir)- self.output_dir.mkdir(exist_ok=True)+ if output_dir is None:+ self.output_dir = Path(__file__).resolve().parent.parent / "element_clones"+ else:+ self.output_dir = Path(output_dir)+ self.output_dir.mkdir(parents=True, exist_ok=True)self.comprehensive_cloner = ComprehensiveElementCloner()def _safe_process_framework_handlers(self, framework_handlers):