Get computed styles
get_computed_stylesReveal an element's computed styles to pinpoint why it is invisible or unclickable. Returns resolved CSS values, position, size, and viewport presence.
Instructions
Read an element's computed styles, as the browser actually resolved them.
Computed styles are the end result of the whole cascade, so this answers
what a stylesheet alone cannot: why an element is invisible
(display: none, visibility: hidden, opacity: 0), what a CSS variable
resolved to, or which font actually got used.
Also reports the element's box: position, size, and whether it is currently in the viewport. An element with zero width or height is present in the DOM but not rendered, which is the usual reason a click appears to do nothing.
By default only properties that differ from the browser default are returned, because the full set runs to several hundred entries and buries the interesting ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | No | Element uid from the most recent take_snapshot, as an alternative to `selector`. Ignored when `selector` is given. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| selector | No | CSS selector of the element to inspect, e.g. "#header" or ".btn.primary". The first match is used. Leave empty to use `uid` instead. | |
| properties | No | Only return these CSS properties, e.g. ["display", "color", "font-size"]. Omit to get the properties that differ from the browser default, which is usually what you want — the full computed set is several hundred entries. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |