Class: OmniAI::Tools::Browser::PageScreenshotTool
- Defined in:
- lib/omniai/tools/browser/page_screenshot_tool.rb
Overview
A browser automation tool for taking screenshots of the current page.
Instance Method Summary collapse
Methods inherited from BaseTool
Constructor Details
This class inherits a constructor from OmniAI::Tools::Browser::BaseTool
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/omniai/tools/browser/page_screenshot_tool.rb', line 12 def execute @logger.info("#{self.class.name}##{__method__}") @driver.screenshot do |file| "data:image/png;base64,#{Base64.strict_encode64(file.read)}" end end |