Struct thirtyfour::SwitchTo
source · pub struct SwitchTo { /* private fields */ }Expand description
Struct for switching between frames/windows/alerts.
Implementations§
source§impl SwitchTo
impl SwitchTo
sourcepub fn new(handle: Arc<SessionHandle>) -> Self
pub fn new(handle: Arc<SessionHandle>) -> Self
Create a new SwitchTo struct. This is typically created internally
via a call to WebDriver::switch_to().
sourcepub async fn active_element(self) -> WebDriverResult<WebElement>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::active_element()
pub async fn active_element(self) -> WebDriverResult<WebElement>
Get the active element for this session.
sourcepub fn alert(self) -> Alert
👎Deprecated since 0.30.0: This method has been deprecated. See the Alert module for new method names
pub fn alert(self) -> Alert
Alert module for new method namesSwitch to the specified alert.
sourcepub async fn default_content(self) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::enter_default_frame()
pub async fn default_content(self) -> WebDriverResult<()>
Switch to the default frame.
sourcepub async fn frame_number(self, frame_number: u16) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::enter_frame()
pub async fn frame_number(self, frame_number: u16) -> WebDriverResult<()>
Switch to the frame specified at the index.
sourcepub async fn frame_element(
self,
frame_element: &WebElement,
) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebElement::enter_frame()
pub async fn frame_element( self, frame_element: &WebElement, ) -> WebDriverResult<()>
Switch to the frame contained within the element.
sourcepub async fn parent_frame(self) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::enter_parent_frame()
pub async fn parent_frame(self) -> WebDriverResult<()>
Switch to the parent of the frame the client is currently contained within.
sourcepub async fn new_window(self) -> WebDriverResult<WindowHandle>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::new_window()
pub async fn new_window(self) -> WebDriverResult<WindowHandle>
Create a new window.
sourcepub async fn new_tab(self) -> WebDriverResult<WindowHandle>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::new_tab()
pub async fn new_tab(self) -> WebDriverResult<WindowHandle>
Create a new tab.
sourcepub async fn window(self, handle: WindowHandle) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::switch_to_window()
pub async fn window(self, handle: WindowHandle) -> WebDriverResult<()>
Switch to the specified window.
sourcepub async fn window_name(self, name: &str) -> WebDriverResult<()>
👎Deprecated since 0.30.0: This method has been moved to WebDriver::switch_to_named_window()
pub async fn window_name(self, name: &str) -> WebDriverResult<()>
Switch to the specified named window.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SwitchTo
impl !RefUnwindSafe for SwitchTo
impl Send for SwitchTo
impl Sync for SwitchTo
impl Unpin for SwitchTo
impl !UnwindSafe for SwitchTo
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