use crate::actor::Page;
use crate::error::Result;
use tracing::info;
pub struct NavigationManager;
impl NavigationManager {
pub fn new() -> Self {
Self
}
pub async fn navigate(&self, page: &Page, url: &str) -> Result<()> {
page.goto(url).await?;
info!("Navigated to: {}", url);
Ok(())
}
}
impl Default for NavigationManager {
fn default() -> Self {
Self::new()
}
}