Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions clients/python/src/vibium/async_api/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---

Expand Down
3 changes: 3 additions & 0 deletions clients/python/src/vibium/sync_api/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---

Expand Down
6 changes: 6 additions & 0 deletions tests/py/test_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading