From 939448c68e0364e9f30ea727861151d24e132250 Mon Sep 17 00:00:00 2001 From: lidong Date: Thu, 9 Feb 2023 21:05:24 +0800 Subject: [PATCH] scrollIntoView --- ichrome/async_utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ichrome/async_utils.py b/ichrome/async_utils.py index e577a2e..2a49af9 100644 --- a/ichrome/async_utils.py +++ b/ichrome/async_utils.py @@ -2541,6 +2541,14 @@ async def browser_version(self, timeout=NotSet): "[Browser.getVersion]" return await self.send('Browser.getVersion', timeout=timeout) + async def scrollIntoView(self, + cssselector: str, + action='scrollIntoView()', + timeout=NotSet) -> Union[Tag, TagNotFound]: + return await self.querySelector(cssselector=cssselector, + action=action, + timeout=timeout) + class OffsetMoveWalker: __slots__ = ('path', 'start_x', 'start_y', 'tab', 'timeout')