首页布局优化前
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
// Browser action definitions for Hands system
|
||||
// Note: These types are reserved for future Browser Hand automation features
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
@@ -324,10 +324,10 @@ impl BrowserClient {
|
||||
let client = self.get_client(session_id).await?;
|
||||
let locator = Locator::Css(selector);
|
||||
|
||||
// Use wait_for_find with proper API
|
||||
// Use the new wait().for_element() API instead of deprecated wait_for_find
|
||||
let element = tokio::time::timeout(
|
||||
Duration::from_millis(timeout_ms),
|
||||
client.wait_for_find(locator)
|
||||
client.wait().for_element(locator)
|
||||
)
|
||||
.await
|
||||
.map_err(|_| BrowserError::Timeout {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Tauri commands for browser automation
|
||||
// Note: Some imports are reserved for future Browser Hand features
|
||||
|
||||
use crate::browser::actions::{ActionResult, BrowserAction, BrowserTask, FormField};
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use crate::browser::actions::BrowserAction;
|
||||
use crate::browser::client::BrowserClient;
|
||||
use crate::browser::error::BrowserError;
|
||||
use crate::browser::session::{BrowserType, SessionConfig};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Browser automation error types
|
||||
// Note: Some variants are reserved for future error handling scenarios
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
// Browser automation module using Fantoccini
|
||||
// Provides Browser Hand capabilities for ZCLAW
|
||||
//
|
||||
// Note: Public exports are reserved for future Browser Hand features
|
||||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
pub mod client;
|
||||
pub mod commands;
|
||||
@@ -7,6 +11,7 @@ pub mod error;
|
||||
pub mod session;
|
||||
pub mod actions;
|
||||
|
||||
// Re-export main types for convenience
|
||||
pub use client::BrowserClient;
|
||||
pub use error::{BrowserError, Result};
|
||||
pub use session::{BrowserSession, SessionConfig};
|
||||
|
||||
@@ -166,6 +166,9 @@ impl SessionManager {
|
||||
sessions.values().cloned().collect()
|
||||
}
|
||||
|
||||
/// Get the number of active sessions
|
||||
/// Reserved for future status dashboard
|
||||
#[allow(dead_code)]
|
||||
pub async fn session_count(&self) -> usize {
|
||||
let sessions = self.sessions.read().await;
|
||||
sessions.len()
|
||||
|
||||
Reference in New Issue
Block a user