diff --git a/clients/python/src/vibium/async_api/element.py b/clients/python/src/vibium/async_api/element.py index d022b10..0c69454 100644 --- a/clients/python/src/vibium/async_api/element.py +++ b/clients/python/src/vibium/async_api/element.py @@ -120,6 +120,9 @@ async def set_files(self, files: List[str], timeout: Optional[int] = None) -> No "files": files, "timeout": timeout, })) + + async def highlight(self) -> None: + await self._client.send("vibium:element.highlight", self._command_params()) # --- State --- diff --git a/clients/python/src/vibium/sync_api/element.py b/clients/python/src/vibium/sync_api/element.py index 1ba9653..901d555 100644 --- a/clients/python/src/vibium/sync_api/element.py +++ b/clients/python/src/vibium/sync_api/element.py @@ -79,6 +79,9 @@ def dispatch_event( def set_files(self, files: List[str], timeout: Optional[int] = None) -> None: self._loop.run(self._async.set_files(files, timeout)) + + def highlight(self) -> None: + self._loop.run(self._async.highlight()) # --- State --- diff --git a/tests/py/test_interaction.py b/tests/py/test_interaction.py index 539b014..f5bedff 100644 --- a/tests/py/test_interaction.py +++ b/tests/py/test_interaction.py @@ -92,6 +92,12 @@ async def test_scroll_into_view(async_page, test_server): assert await el.is_visible() +async def test_highlight(async_page, test_server): + await async_page.go(test_server) + el = await async_page.find("#info") + await el.highlight() + + async def test_dispatch_event(async_page, test_server): await async_page.go(test_server + "/inputs") inp = await async_page.find("#text-input")