BrowserController class abstract interface

The controller seam behind every browser_* tool: one typed method per bridge browser op. Implementations throw BrowserToolException with the contract error codes.

Properties

attached bool
Whether a browser backend is usable right now — the availability floor for the whole browser family (CLI: an extension is paired).
no setter
hashCode int
The hash code for this object.
no setterinherited
onAvailabilityChanged ↔ void Function(bool attached)?
Fires when attached flips; the host rebuilds tool availability.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

click(String selector, {int? tabId}) Future<void>
Clicks the first element matching selector.
evalCode(String code, {int? tabId}) Future<Object?>
Evaluates JavaScript in the page's isolated world; a returned Promise is awaited and its resolution is the result.
listTabs() Future<List<BrowserTab>>
Every open tab (id, url, title, active flag, tab group).
Navigates a tab; returns the tab id, final URL, and page title.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pressKey(String key, {String? selector, int? tabId}) Future<void>
Presses key, optionally focused on selector.
readDom({String? selector, int? maxNodes, bool includeShadow, int? tabId}) Future<BrowserDom>
Reads a bounded serialized DOM subtree.
screenshot({int? tabId}) Future<Uint8List>
Captures a PNG screenshot of a tab.
select(String selector, String value, {int? tabId}) Future<void>
Selects value in the <select> matching selector.
switchTab(int tabId) Future<void>
Makes tabId the active tab.
taskEnd() Future<void>
Cleans the task's tab group (agent-opened tabs only).
toString() String
A string representation of this object.
inherited
type(String selector, String text, {bool submit, int? tabId}) Future<void>
Types text into selector, optionally pressing Enter afterwards.
waitFor({String? selector, String? text, required int timeoutMs, int? tabId}) Future<BrowserWaitResult>
Waits until text appears or selector matches, up to timeoutMs.

Operators

operator ==(Object other) bool
The equality operator.
inherited