chrome_for_testing_manager/
session.rs1use crate::ChromeForTestingManagerError;
2use rootcause::Report;
3use rootcause::prelude::ResultExt;
4
5#[derive(Debug)]
10pub struct Session {
11 pub(crate) driver: thirtyfour::WebDriver,
12}
13
14impl Session {
15 pub(crate) async fn quit(self) -> Result<(), Report<ChromeForTestingManagerError>> {
21 self.driver
22 .quit()
23 .await
24 .context(ChromeForTestingManagerError::QuitSession)
25 }
26}
27
28impl std::ops::Deref for Session {
29 type Target = thirtyfour::WebDriver;
30
31 fn deref(&self) -> &Self::Target {
32 &self.driver
33 }
34}