pub struct Tab {
pub target_id: String,
pub session_id: Option<String>,
}Expand description
Represents a browser tab/page
Fields§
§target_id: String§session_id: Option<String>Implementations§
Source§impl Tab
impl Tab
Sourcepub async fn create(session: &Session, url: &str) -> Result<Self>
pub async fn create(session: &Session, url: &str) -> Result<Self>
Create a new tab via CDP. If background=true, opens without focusing.
Navigate to URL and wait for fully loaded. Delegates to Session::navigate.
Sourcepub async fn evaluate(&self, session: &Session, js: &str) -> Result<Value>
pub async fn evaluate(&self, session: &Session, js: &str) -> Result<Value>
Evaluate JS in tab context, return JSON result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tab
impl RefUnwindSafe for Tab
impl Send for Tab
impl Sync for Tab
impl Unpin for Tab
impl UnsafeUnpin for Tab
impl UnwindSafe for Tab
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more