File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1818
1919fmt = "<green>{time: HH:mm:ss.SSS}</green> | <level>{level: <8}</level>- <level>{message}</level>"
2020
21- logger .add (sys .stderr , level = "DEBUG " , format = fmt )
21+ logger .add (sys .stderr , level = "INFO " , format = fmt )
2222
2323
2424__all__ = [
Original file line number Diff line number Diff line change @@ -259,6 +259,25 @@ async def goto(
259259
260260 return active_page
261261
262+ async def scroll_to_bottom (
263+ self ,
264+ timeout : float = 30000 ,
265+ scroll_increment : int = 1000 ,
266+ no_progress_limit : int = 3 ,
267+ ):
268+ """
269+ Scrolls to the bottom of the current page.
270+
271+ Returns:
272+ None
273+ """
274+ active_page = await self .get_active_page ()
275+ await active_page .scroll_to_bottom (
276+ timeout = timeout ,
277+ scroll_increment = scroll_increment ,
278+ no_progress_limit = no_progress_limit ,
279+ )
280+
262281 async def _launch (self ):
263282 """
264283 Launches the Playwright instance and sets up the browser context and page manager.
Original file line number Diff line number Diff line change @@ -234,6 +234,25 @@ def goto(
234234 raise IncorrectOutcomeError (f"Incorrect navigation, reason: { e } " )
235235 return active_page
236236
237+ def scroll_to_bottom (
238+ self ,
239+ timeout : float = 30000 ,
240+ scroll_increment : int = 1000 ,
241+ no_progress_limit : int = 3 ,
242+ ):
243+ """
244+ Scrolls to the bottom of the current page.
245+
246+ Returns:
247+ None
248+ """
249+ active_page = self .get_active_page ()
250+ active_page .scroll_to_bottom (
251+ timeout = timeout ,
252+ scroll_increment = scroll_increment ,
253+ no_progress_limit = no_progress_limit ,
254+ )
255+
237256 def _launch (self ):
238257 """
239258 Launches the Playwright instance and sets up the browser context and page manager.
You can’t perform that action at this time.
0 commit comments