Expand description
§dravr-browser
Reusable headless-Chrome automation primitives extracted so multiple dravr crates share one battle-tested browser stack instead of each re-rolling it.
§What’s here
launch— launch Chrome with a persistent profile (cookies survive across runs) or attach to an external Chrome via CDP.stealth— inject anti-detection + an optional network-capture hook, including a streaming (stealth::StealthOptions::capture_stream) variant that tees SSE bodies as they arrive.capture— read the capture buffer and parse SSEdata:payloads.input— CDP mouse/keyboard input and DOM helpers.session— capture/inject cookie sessions (session::AuthSession).vision— thevision::VisionAnalyzerseam consumers implement to supply screenshot analysis without this crate depending on any LLM.
This crate is intentionally LLM-agnostic: it never depends on a concrete model crate, so consumers (which may be LLM crates) avoid a dependency cycle.
Re-exports§
pub use capture::parse_sse_data;pub use capture::read_last_capture;pub use capture::CaptureState;pub use error::BrowserError;pub use error::BrowserResult;pub use input::cdp_click_at;pub use input::cdp_insert_text;pub use input::cdp_select_all_delete;pub use input::click_element;pub use input::element_exists;pub use input::fill_input_field;pub use input::get_element_center;pub use input::read_visible_text;pub use launch::connect_browser;pub use launch::launch_browser;pub use launch::open_page_with_stealth;pub use launch::BrowserLaunchConfig;pub use launch::CONNECT_URL_ENV;pub use session::capture_session;pub use session::generate_session_id;pub use session::AuthSession;pub use session::CookieData;pub use stealth::apply_stealth;pub use stealth::StealthOptions;pub use stealth::CAPTURE_GLOBAL;pub use teardown_signal::is_in_progress as is_browser_teardown_in_progress;pub use teardown_signal::TeardownGuard;pub use vision::VisionAnalyzer;pub use vision::VisionError;
Modules§
- capture
- Reading the capture buffer and parsing SSE bodies.
- error
- Error type for browser automation.
- input
- CDP-based input and DOM helpers.
- js_
utils - JavaScript string-escaping utilities for CDP evaluate calls.
- launch
- Chrome launch + persistent-profile management.
- session
- Cookie-based session capture/injection.
- stealth
- Anti-detection stealth + optional network capture hook.
- teardown_
signal - Process-wide browser-teardown signal for WS-reset log suppression. Browser-teardown signal published to the rest of the process.
- vision
- The vision-LLM seam.