pub struct Tab { /* private fields */ }Expand description
Represents a CDP browser tab (target) session.
Implementations§
Source§impl Tab
impl Tab
pub async fn set_viewport(&self, viewport: &Viewport) -> Result<&Self>
pub async fn clear_viewport(&self) -> Result<&Self>
pub async fn set_content(&self, content: &str) -> Result<&Self>
pub async fn evaluate(&self, expression: &str) -> Result<Value>
pub async fn evaluate_as_string(&self, expression: &str) -> Result<String>
pub async fn find_element(&self, selector: &str) -> Result<Element<'_>>
pub async fn wait_for_selector( &self, selector: &str, timeout_ms: u64, ) -> Result<Element<'_>>
pub async fn screenshot(&self, opts: CaptureOptions) -> Result<String>
pub async fn activate(&self) -> Result<&Self>
pub async fn goto(&self, url: &str) -> Result<&Self>
pub async fn goto_no_wait(&self, url: &str) -> Result<&Self>
pub async fn reload(&self) -> Result<&Self>
pub async fn url(&self) -> Result<String>
pub async fn title(&self) -> Result<String>
pub fn session_id(&self) -> &str
pub fn target_id(&self) -> &str
pub async fn close(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for Tab
impl RefUnwindSafe for Tab
impl Send for Tab
impl Sync for Tab
impl Unpin 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