AS AgentScopeAPI 手册 / API Reference

TakeScreenshotTool

public class TakeScreenshotTool extends BrowserSandboxTool
源码Source io/agentscope/runtime/sandbox/tools/browser/TakeScreenshotTool.java:27–80

Take Screenshot 工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools.browser 包,继承自 BrowserSandboxTool。核心成员包括 bind、browser_take_screenshot、TakeScreenshotTool。

A class in io.agentscope.runtime.sandbox.tools.browser that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.browser. Extends BrowserSandboxTool.

构造器摘要Constructor Summary

构造器Constructor说明Description
public TakeScreenshotTool()
初始化 `TakeScreenshotTool` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public SandboxTool bind(Sandbox sandbox)
设置该参数。
Performs the bind operation.
public String browser_take_screenshot(Boolean raw, String filename, String element, String ref)
执行 `browser_take_screenshot` 方法。
Performs the browser take screenshot operation.

构造器详情Constructor Detail

TakeScreenshotTool

public TakeScreenshotTool()

初始化 TakeScreenshotTool 实例。

Creates a new instance.

源码Source io/agentscope/runtime/sandbox/tools/browser/TakeScreenshotTool.java:30–59

方法详情Method Detail

bind

public SandboxTool bind(Sandbox sandbox)

设置该参数。

Performs the bind operation.

参数Parameters
名称Name类型Type说明Description
sandboxSandbox沙箱(类型 `Sandbox`)。The sandbox.
返回Returns SandboxTool
返回SandboxTool。Returns sandbox tool.
源码Source io/agentscope/runtime/sandbox/tools/browser/TakeScreenshotTool.java:61–65

browser_take_screenshot

public String browser_take_screenshot(Boolean raw, String filename, String element, String ref)

执行 browser_take_screenshot 方法。

Performs the browser take screenshot operation.

参数Parameters
名称Name类型Type说明Description
rawBoolean原始(类型 `Boolean`)。The raw.
filenameStringfilename(类型 `String`)。The filename.
elementStringelement(类型 `String`)。The element.
refString引用(类型 `String`)。The ref.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/tools/browser/TakeScreenshotTool.java:67–78

继承成员Inherited Members

继承自Methods inherited from BrowserSandboxTool
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.