pub(crate) struct WebDriverSession {
id: Uuid,
webview_id: Option<WebViewId>,
browsing_context_id: Option<BrowsingContextId>,
timeouts: TimeoutsConfiguration,
page_loading_strategy: PageLoadStrategy,
strict_file_interactability: bool,
user_prompt_handler: HashMap<WebDriverUserPrompt, PromptHandlerConfiguration>,
pub(crate) input_state_table: HashMap<String, InputSourceState>,
pub(crate) input_cancel_list: Vec<(String, ActionItem)>,
}Expand description
Represents the current WebDriver session and holds relevant session state. Currently, only 1 webview is supported per session. So only there is only 1 InputState.
Fields§
§id: Uuid§webview_id: Option<WebViewId>https://www.w3.org/TR/webdriver2/#dfn-current-top-level-browsing-context The id of the current top-level browsing context
browsing_context_id: Option<BrowsingContextId>https://www.w3.org/TR/webdriver2/#dfn-current-browsing-context The id of the current browsing context
timeouts: TimeoutsConfiguration§page_loading_strategy: PageLoadStrategy§strict_file_interactability: bool§user_prompt_handler: HashMap<WebDriverUserPrompt, PromptHandlerConfiguration>§input_state_table: HashMap<String, InputSourceState>§input_cancel_list: Vec<(String, ActionItem)>Implementations§
Source§impl WebDriverSession
impl WebDriverSession
pub(crate) fn new() -> WebDriverSession
pub(crate) fn set_webview_id(&mut self, webview_id: WebViewId)
pub(crate) fn set_browsing_context_id( &mut self, browsing_context_id: BrowsingContextId, )
pub(crate) fn current_webview_id(&self) -> Option<WebViewId>
pub(crate) fn current_browsing_context_id(&self) -> Option<BrowsingContextId>
pub(crate) fn session_timeouts(&self) -> &TimeoutsConfiguration
pub(crate) fn session_timeouts_mut(&mut self) -> &mut TimeoutsConfiguration
pub(crate) fn page_loading_strategy(&self) -> PageLoadStrategy
pub(crate) fn strict_file_interactability(&self) -> bool
pub(crate) fn user_prompt_handler( &self, ) -> &HashMap<WebDriverUserPrompt, PromptHandlerConfiguration>
pub(crate) fn pointer_ids(&self) -> FxHashSet<u32>
Auto Trait Implementations§
impl Freeze for WebDriverSession
impl RefUnwindSafe for WebDriverSession
impl Send for WebDriverSession
impl Sync for WebDriverSession
impl Unpin for WebDriverSession
impl UnsafeUnpin for WebDriverSession
impl UnwindSafe for WebDriverSession
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert