How an action reaches an application
Kasm Session Runtime can reach a control in four ways. They differ in where the target comes from, and the ladder ranks them by how much to trust that source. Use the highest rung that reaches the control. Only the lowest rung needs a vision model.
The rungs
Section titled “The rungs”| Rung | Where the target comes from | Needs a model |
|---|---|---|
| 0. Page element | The browser’s page structure. The action goes to the element itself, with no coordinate | No |
| 1. Declared position | A fraction of the window’s width and height, written by the author with a screenshot in hand and reviewed like code | No |
| 2. Accessibility | The application’s own list of controls. The application names the control and performs the action | No |
| 3. Located on screen | A vision model looks at a fresh screenshot and says where the described element is | Yes |
Key chords sit beside rung 0. Where an application has a keyboard shortcut, a key chord does not depend on layout, theme or screen size, and beats any click.
What each way of driving calls
Section titled “What each way of driving calls”| Rung | Scenario step | Method for an agent or script |
|---|---|---|
| 0. Page element | cdp_click, cdp_fill and the other cdp_* steps |
dom.click, dom.fill, dom.type, dom.click_described |
| 1. Declared position | click center, click "<declared-target>", click <fx> <fy> |
input.click with a position you supply |
| 2. Accessibility | click_element "<name>", set_text, set_value, select |
a11y.action, a11y.set_text, a11y.set_value, a11y.select |
| 3. Located on screen | click_grounded "<description>", with a required expect: |
screen.ground, then input.click |
The agent in your workspace and your own agent call the same methods. A scenario’s scripted steps pick the rung by the step they use, and the runtime does not try the next rung when one fails. The runtime’s loop, behind a goal: step, chooses from a list of named targets, accessibility names and page elements that the scenario and the runtime give it, and describes an element in words when it needs rung 3. It never supplies a coordinate or a selector. See Goal steps.
Coverage of each rung
Section titled “Coverage of each rung”Rung 0 works in Chromium-family browsers (Chrome, Chromium, Brave, Edge, Vivaldi) over the Chrome DevTools Protocol and in Firefox over WebDriver BiDi, and only inside a page. A browser’s own toolbar, extension popups and native file dialogs are outside any page. Firefox has no accessibility tree, so its pages are addressed by selector. dom.list_interactive and dom.click_described need a Chromium-family browser.
Rung 1 reads the window’s geometry at the moment of the click, so a window that has moved or resized still gets the right pixel. A fraction outside 0 to 1 is rejected when the scenario loads.
Rung 2 works for GTK, Qt and Electron applications that publish their controls over AT-SPI. When a control offers an action, the runtime asks the application to perform it and no coordinate is involved. When a control offers only a position, the runtime clicks the centre of the rectangle the application reports, which is less reliable. A scenario step can ask the application what state a control is in afterwards (expect_state), with no screenshot and no model.
Rung 3 is the last resort. The runtime captures the screen, asks the model where the description is, clicks there and asks the model to confirm the expected change. If the change is absent, it locates the element again and clicks only if the new position differs, so it never repeats a click in the same place. If the model cannot confirm, the click is recorded as unverified with a concern. With no vision model configured, a scripted click_grounded step ends the run as test-error. See Vision models.
What the report records
Section titled “What the report records”Every step row in report.json records the backend that ran it: cdp, bidi, atspi, xtest, vision, shell, rpc or none. A click also records its rung (center, declared, literal, element, grounded) and the pixels it resolved to. A wrong declared fraction means the scenario needs fixing, and a wrong located click means the model placed it badly. Runs that locate elements on screen add a grounding block with what was asked for, where the model put it and whether the click was verified.