Firoj112 commited on
Commit
f018237
·
verified ·
1 Parent(s): b6c2c27

Update tools/detect_elements.py

Browse files
Files changed (1) hide show
  1. tools/detect_elements.py +3 -2
tools/detect_elements.py CHANGED
@@ -17,9 +17,10 @@ class DetectElementsTool(Tool):
17
  }
18
  output_type = "string"
19
 
20
- def __init__(self):
21
  super().__init__()
22
- self.is_initialized = True # No external dependencies like driver, so always True
 
23
  logger.debug(f"DetectElementsTool initialized: is_initialized={self.is_initialized}")
24
 
25
  def forward(self, screenshot_path: Optional[str], element_type="table"):
 
17
  }
18
  output_type = "string"
19
 
20
+ def __init__(self, driver=None):
21
  super().__init__()
22
+ self.driver = driver # Store driver for consistency, even if unused
23
+ self.is_initialized = True # No dependency on driver, so always True
24
  logger.debug(f"DetectElementsTool initialized: is_initialized={self.is_initialized}")
25
 
26
  def forward(self, screenshot_path: Optional[str], element_type="table"):