Summary
The Python client does not implement element.highlight(), even though the official API reference documents it, the Go backend exposes vibium:element.highlight, and the Java client already implements it. Users following the docs get AttributeError at runtime.
Impacted operations
element.highlight() (sync API)
await element.highlight() (async API)
Expected behavior
After finding an element, calling highlight() should send vibium:element.highlight to the backend and briefly outline the element in the browser (same as Java and CLI).
Actual behavior
Element has no highlight method:
AttributeError: 'Element' object has no attribute 'highlight'
Root cause
The full stack already supports highlighting except the Python client:
docs/reference/api.md (row 79) documents el.highlight() for Python
- Go handler
handleVibiumElHighlight implements vibium:element.highlight in clicker/internal/api/handlers_state.go
- Java implements it as a one-line
sendAction("vibium:element.highlight") in clients/java/src/main/java/com/vibium/Element.java
But Python never added the equivalent thin BiDi wrapper in:
clients/python/src/vibium/async_api/element.py
clients/python/src/vibium/sync_api/element.py
Reproduction (Python)
Environment
- OS: macOS (darwin arm64)
- vibium (PyPI): 26.5.31
- Python: 3.9.x
Minimal repro
from vibium import browser
b = browser.start(headless=True)
p = b.new_page()
p.go("https://example.com")
el = p.find("h1")
el.highlight()
b.stop()
Output
AttributeError: 'Element' object has no attribute 'highlight'
Proposed fix
Add highlight() to both Python Element wrappers, mirroring Java's sendAction("vibium:element.highlight") pattern used by other interaction methods (focus, hover, etc.):
- Async (
async_api/element.py): await self._client.send("vibium:element.highlight", self._command_params())
- Sync (
sync_api/element.py): delegate to async via self._loop.run(self._async.highlight())
And add tests (async + sync) asserting the call completes without AttributeError or unknown-command BiDiError, similar to JavaClusterFixTest.highlightIsImplemented.
Summary
The Python client does not implement
element.highlight(), even though the official API reference documents it, the Go backend exposesvibium:element.highlight, and the Java client already implements it. Users following the docs getAttributeErrorat runtime.Impacted operations
element.highlight()(sync API)await element.highlight()(async API)Expected behavior
After finding an element, calling
highlight()should sendvibium:element.highlightto the backend and briefly outline the element in the browser (same as Java and CLI).Actual behavior
Elementhas nohighlightmethod:Root cause
The full stack already supports highlighting except the Python client:
docs/reference/api.md(row 79) documentsel.highlight()for PythonhandleVibiumElHighlightimplementsvibium:element.highlightinclicker/internal/api/handlers_state.gosendAction("vibium:element.highlight")inclients/java/src/main/java/com/vibium/Element.javaBut Python never added the equivalent thin BiDi wrapper in:
clients/python/src/vibium/async_api/element.pyclients/python/src/vibium/sync_api/element.pyReproduction (Python)
Environment
Minimal repro
Output
Proposed fix
Add
highlight()to both PythonElementwrappers, mirroring Java'ssendAction("vibium:element.highlight")pattern used by other interaction methods (focus,hover, etc.):async_api/element.py):await self._client.send("vibium:element.highlight", self._command_params())sync_api/element.py): delegate to async viaself._loop.run(self._async.highlight())And add tests (async + sync) asserting the call completes without
AttributeErroror unknown-commandBiDiError, similar toJavaClusterFixTest.highlightIsImplemented.