Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Document pagination browser script helpers

Magnus Müller00d0e61502a7
diff --git a/RUST_AGENT_INTEGRATION_FEATURES.md b/RUST_AGENT_INTEGRATION_FEATURES.md
index 2874127ff..acc747ed6 100644
--- a/RUST_AGENT_INTEGRATION_FEATURES.md
+++ b/RUST_AGENT_INTEGRATION_FEATURES.md
@@ -306,6 +306,11 @@ Terminal core branch: `magnus/browser-use-rust-integration` at latest pulled mai
- The helper combines JSON-LD, product meta tags, and visible product-like cards for non-Shopify catalogs, returning normalized titles, URLs, descriptions, prices, specs, labels, images, source, scores, and detail-action counts.
- Proof: `browser_script_product_records_snapshot_normalizes_catalog_products`.
+60. Browser-script pagination helper
+ - Terminal browser scripts now expose `pagination_controls_snapshot(limit=20)`, `click_pagination(label_or_text="next", timeout=2.0)`, and `click_pagination_until_stable(label_or_text="load more", max_clicks=20, wait_seconds=0.8, idle_timeout=3.0, count_selector=None)`.
+ - The helpers rank visible Next/Load More/pager controls, click matched controls by label or intent, and repeatedly advance result lists until no matching control remains or the visible result state stops changing.
+ - Proof: `browser_script_pagination_helpers_click_until_stable`.
+
## Current Verification
- `python3 -m py_compile browser_use/rust/service.py browser_use/rust/__init__.py browser_use/__init__.py tests/ci/test_rust_agent.py examples/rust_agent/basic.py examples/rust_agent/real_v8_smoke.py`
@@ -343,6 +348,7 @@ Terminal core branch: `magnus/browser-use-rust-integration` at latest pulled mai
- `CARGO_INCREMENTAL=0 cargo test -q -p browser-use-browser browser_script_document_links_snapshot_classifies_filing_documents -- --nocapture`
- `CARGO_INCREMENTAL=0 cargo test -q -p browser-use-browser browser_script_shopify_products_api_normalizes_catalog_pages -- --nocapture`
- `CARGO_INCREMENTAL=0 cargo test -q -p browser-use-browser browser_script_product_records_snapshot_normalizes_catalog_products -- --nocapture`
+- `CARGO_INCREMENTAL=0 cargo test -q -p browser-use-browser browser_script_pagination_helpers_click_until_stable -- --nocapture`
- Managed-headless end-to-end:
- `BROWSER_USE_TERMINAL_BINARY=/home/exedev/Developer/terminal/target/debug/browser-use-terminal BROWSER_USE_RUST_BROWSER_MODE=managed-headless BU_TASK='Open https://example.com and report the page title only.' BU_MAX_STEPS=12 timeout 300 uv run python examples/rust_agent/basic.py`
- Output: `Example Domain`