[][src]Struct thirtyfour::sync::SwitchTo

pub struct SwitchTo { /* fields omitted */ }

Struct for switching between frames/windows/alerts.

Methods

impl SwitchTo[src]

pub fn new(session_id: SessionId, conn: Arc<RemoteConnectionSync>) -> Self[src]

Create a new SwitchTo struct. This is typically created internally via a call to WebDriver::switch_to().

pub fn active_element(&self) -> WebDriverResult<WebElement>[src]

Return the element with focus, or BODY if nothing has focus.

pub fn alert(&self) -> Alert[src]

Return Alert struct for processing the active alert on the page.

pub fn default_content(&self) -> WebDriverResult<()>[src]

Switch focus to the default frame.

pub fn frame_number(&self, frame_number: u16) -> WebDriverResult<()>[src]

Switch focus to the frame by index.

pub fn frame_name(&self, frame_name: &str) -> WebDriverResult<()>[src]

Switch focus to the element with the specified Id or Name.

This will attempt to find the element first by Id, and if that fails, by Name.

pub fn frame_element(&self, frame_element: WebElement) -> WebDriverResult<()>[src]

Switch focus to the specified element.

pub fn parent_frame(&self) -> WebDriverResult<()>[src]

Switch focus to the parent frame.

pub fn window(&self, handle: &WindowHandle) -> WebDriverResult<()>[src]

Switch focus to the specified window.

pub fn window_name(&self, name: &str) -> WebDriverResult<()>[src]

Switch focus to the window with the specified name.

Auto Trait Implementations

impl !RefUnwindSafe for SwitchTo

impl Send for SwitchTo

impl Sync for SwitchTo

impl Unpin for SwitchTo

impl !UnwindSafe for SwitchTo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.