Skip to main content

Module browser

Module browser 

Source
Available on crate feature browser only.
Expand description

Browser automation (WebDriver).

Provides browser automation tools for agents:

Available with feature: browser

Modules§

prelude
Prelude module for convenient imports.
tools
Browser automation tools for ADK agents.

Structs§

AddCookieTool
Tool for adding a cookie.
AlertTool
Tool for handling alerts/dialogs.
BackTool
Tool for going back in browser history.
BrowserConfig
Configuration for browser sessions.
BrowserSession
A browser session that wraps thirtyfour’s WebDriver.
BrowserSessionPool
A pool of browser sessions keyed by user ID.
BrowserToolset
A toolset that provides all browser automation tools.
ClearTool
Tool for clearing input fields.
ClickTool
Tool for clicking elements on the page.
CloseWindowTool
Tool for closing the current window/tab.
DeleteAllCookiesTool
Tool for deleting all cookies.
DeleteCookieTool
Tool for deleting a cookie.
DoubleClickTool
Tool for double-clicking elements.
DragAndDropTool
Tool for drag and drop operations.
ElementState
State information about an element.
ElementStateTool
Tool for checking element state (visible, enabled, selected).
EvaluateJsTool
Tool for executing JavaScript in the browser.
ExtractAttributeTool
Tool for extracting attribute values.
ExtractLinksTool
Tool for extracting links from the page.
ExtractTextTool
Tool for extracting text content from elements.
FileUploadTool
Tool for uploading files.
FocusTool
Tool for focusing an element.
ForwardTool
Tool for going forward in browser history.
GetCookieTool
Tool for getting a specific cookie by name.
GetCookiesTool
Tool for getting all cookies.
HoverTool
Tool for hovering over elements.
ListWindowsTool
Tool for listing all windows/tabs.
MaximizeWindowTool
Tool for maximizing the window.
MinimizeWindowTool
Tool for minimizing the window.
NavigateTool
Tool for navigating to URLs.
NewTabTool
Tool for opening a new tab.
NewWindowTool
Tool for opening a new window.
PageInfoTool
Tool for getting page info (title, URL, etc.).
PageSourceTool
Tool for getting the page HTML source.
PressKeyTool
Tool for pressing keyboard keys.
PrintToPdfTool
Tool for printing page to PDF.
RefreshTool
Tool for refreshing the current page.
RightClickTool
Tool for right-click (context click).
ScreenshotTool
Tool for taking screenshots of the page.
ScrollTool
Tool for scrolling the page.
SelectTool
Tool for selecting options from dropdown menus.
SetWindowSizeTool
Tool for setting window size.
SwitchToDefaultContentTool
Tool for switching to the default/main content.
SwitchToFrameTool
Tool for switching to a frame by index.
SwitchToParentFrameTool
Tool for switching to the parent frame.
SwitchWindowTool
Tool for switching to a window/tab.
TypeTool
Tool for typing text into input fields.
WaitForElementTool
Tool for waiting for an element to appear.
WaitForPageLoadTool
Tool for waiting for page to load.
WaitForTextTool
Tool for waiting for text to appear.
WaitTool
Tool for waiting a fixed duration.

Enums§

BrowserProfile
Pre-configured tool profiles for common use cases.
BrowserType
Supported browser types.

Functions§

escape_js_string
Escape a string for safe interpolation into JavaScript code.
minimal_browser_tools
Helper function to create a minimal browser toolset with only essential tools.
readonly_browser_tools
Helper function to create a read-only browser toolset (no interaction).
shared_session
Create a shared browser session.