fix: make auth login selector targeting more reliable (#945)

Navigate with load, then wait for username/password/submit selectors using the default action timeout. This avoids networkidle hangs on pages with continuous background requests.
This commit is contained in:
Kevin Kipp
2026-03-20 09:01:00 -05:00
committed by GitHub
parent 8d14ecb92b
commit aed466b347
9 changed files with 354 additions and 34 deletions
+5 -1
View File
@@ -129,7 +129,7 @@ pub struct PageInfo {
pub target_type: String, // "page" or "webview"
}
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum WaitUntil {
Load,
DomContentLoaded,
@@ -592,6 +592,10 @@ impl BrowserManager {
!self.pages.is_empty()
}
pub fn default_timeout_ms(&self) -> u64 {
self.default_timeout_ms
}
/// Checks if the CDP connection is alive by sending a simple command.
/// Returns false if the command times out or fails.
pub async fn is_connection_alive(&self) -> bool {