Skip to content
Merged
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
2 changes: 1 addition & 1 deletion dendrite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

fmt = "<green>{time: HH:mm:ss.SSS}</green> | <level>{level: <8}</level>- <level>{message}</level>"

logger.add(sys.stderr, level="DEBUG", format=fmt)
logger.add(sys.stderr, level="INFO", format=fmt)


__all__ = [
Expand Down
19 changes: 19 additions & 0 deletions dendrite/async_api/_core/dendrite_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,25 @@ async def goto(

return active_page

async def scroll_to_bottom(
self,
timeout: float = 30000,
scroll_increment: int = 1000,
no_progress_limit: int = 3,
):
"""
Scrolls to the bottom of the current page.

Returns:
None
"""
active_page = await self.get_active_page()
await active_page.scroll_to_bottom(
timeout=timeout,
scroll_increment=scroll_increment,
no_progress_limit=no_progress_limit,
)

async def _launch(self):
"""
Launches the Playwright instance and sets up the browser context and page manager.
Expand Down
19 changes: 19 additions & 0 deletions dendrite/sync_api/_core/dendrite_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,25 @@ def goto(
raise IncorrectOutcomeError(f"Incorrect navigation, reason: {e}")
return active_page

def scroll_to_bottom(
self,
timeout: float = 30000,
scroll_increment: int = 1000,
no_progress_limit: int = 3,
):
"""
Scrolls to the bottom of the current page.

Returns:
None
"""
active_page = self.get_active_page()
active_page.scroll_to_bottom(
timeout=timeout,
scroll_increment=scroll_increment,
no_progress_limit=no_progress_limit,
)

def _launch(self):
"""
Launches the Playwright instance and sets up the browser context and page manager.
Expand Down