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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user