Browser reference: tools, policy and limits

DataMind Oda drives the Browser tab of a chat's side panel with ten browser tools. This page is the reference for them: what each call does and takes, the references it uses for elements and tabs, the limits it works under, and the policy and site grants behind every call. For the browser itself, see The browser in Oda.

The browser tools

ToolWhat it doesTakes
browser_tabsLists the chat's browser tabs, opens a new one, or closes one.action (list, open, close); url for open; tab for close
browser_navigateLoads an address in a tab, or goes back, forward or reload.url, or action (back, forward, reload); tab
browser_snapshotReads the page as an outline of headings, text and controls; each control carries a reference.tab
browser_get_textReads the page as text, with headings marked from # to ######.tab
browser_clickClicks an element by reference, or at a point on the latest screenshot.ref, or x and y; tab
browser_typeTypes into a field named by reference; refuses sensitive fields.ref, text; clear (on by default), submit (off); tab
browser_press_keyPresses one key from a fixed set of fourteen.key; tab
browser_scrollScrolls the page up, down, left or right.direction; amount (1 to 20, default 1); tab
browser_screenshotCaptures the visible part of the page as one JPEG, saved as browser-screenshot.jpg.tab
browser_wait_forWaits for the page to finish loading, or for text to appear.text (omit it to wait for loading); seconds (default 10); tab

Element and tab references

Typing and sensitive fields

Addresses

Limits

WhatLimit
Addressup to 8192 characters
Typed textup to 10000 characters
Scroll amount1 to 20 screens
Screenshot width320 to 4096 pixels
Wait textup to 500 characters
Wait time10 seconds by default; up to 30 seconds (60000 ms at most)
Click coordinates0 to 100000
Snapshot and page textcut at the size limit (40000 characters by default)
Site nameup to 253 characters
Company site rulesup to 500 entries per list
Takeover holdup to 600000 ms (15000 ms by default)

What you see in the chat

Policy and site grants

When a call fails

When a browser call fails, Oda receives a short reason and guidance to act on. When the browser has more detail, the detail follows the guidance in parentheses.

What happenedWhat Oda is told
No tab is open in the chatNo Browser tab is open in this chat. Open one with browser_tabs and action "open".
The chat is not the one on screenThe browser can only open tabs in the chat the user is looking at. Ask the user to switch to this chat, then try again.
The page moved to another siteThe tab moved to another site before the action ran. Take a new browser_snapshot.
You have taken the tabThe user has taken control of this tab. Stop acting in it, tell the user what you were doing, and wait until they hand it back with Resume.
The field is sensitiveThat field takes a password, payment detail, or one-time code. Never type these: ask the user to fill it in themselves, then continue.
The reference is out of dateThat element reference is not in the latest snapshot. Take a new browser_snapshot and use its references.
The address cannot be openedThat address cannot be opened in the Oda browser.
The call ran out of timeThe browser did not finish in time. Take a new browser_snapshot to see the current state.
Anything elseThe browser operation failed.

Questions, answered

What do the element references in a snapshot mean?

A snapshot lists the page's controls, each with a reference such as e1. browser_click and browser_type name one of these references to act on that element. References expire when the page navigates, so take a new snapshot after the page changes; the elements you pick yourself use the same shape, such as p1, and are explained in Picking page elements.

Why did a click fail with "Pass either ref, or both x and y."?

The click did not carry a usable target. A click takes either an element reference, or both coordinates measured on the latest screenshot. A call with neither, or with a reference and coordinates together, is refused; use one form and run the call again.

Why does a reference fail as "not in the latest snapshot"?

The page changed since the snapshot the reference came from, most often because it navigated. Take a new snapshot and use its references; Oda is told That element reference is not in the latest snapshot. Take a new browser_snapshot and use its references.

What does "focus moved to another field" mean?

While typing, the call focuses the field and checks it again. When focus lands elsewhere, or on a field that takes a password, a payment detail or a one-time code, typing stops and the sensitive-field guidance follows: Oda never types these and asks you to fill the field in yourself. If the reference points at something that takes no text, the detail reads that element is not a text field; click it, or find the input inside it with browser_snapshot. Take a new snapshot, click the field yourself, then retry.

Which keys can Oda press?

browser_press_key presses one key from a fixed set of fourteen: Enter, Tab, Escape, Backspace, Delete, Space, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp and PageDown. A key outside the set, such as F12, is refused.

What are the limits for typing, scrolling and waiting?

Why can't Oda take a screenshot here?

A screenshot is saved through the app's image storage, and where that storage is not available the call fails with Screenshots need image storage, which this app does not provide. Use browser_snapshot instead. Use a page snapshot or the page text instead, and keep screenshots for charts, images or layouts that an outline cannot describe.

Where is an "Always allow" answer remembered?

For the workspace folder: Always allow <site> is kept for that workspace, so every chat that works in the same folder reuses it. Allow in this chat lasts until the chat ends or Oda restarts, and a chat without a workspace folder keeps its always answer only while Oda is open. If the stored answers cannot be read, they grant nothing, and the next answer rewrites them.

Why did the browser tools disappear from a chat?

The tools come with your account's browser permission. While the account holds it, the tools are present in chats; when it is withdrawn, they are removed and browser calls stop. If the tools never appear, ask your administrator to give the account the browser permission (see Manage DataMind Oda for your company).

What does "The page content was cut at the size limit" mean?

A read of the page, a snapshot or the page text, was longer than the size limit, so the result was cut and the rest was not sent. Scroll the page or narrow the task, then read again; the cut affects that result, not the page.