[−][src]Struct thirtyfour::SwitchTo
Struct for switching between frames/windows/alerts.
Methods
impl SwitchTo
[src]
pub fn new(session_id: SessionId, conn: Arc<RemoteConnectionAsync>) -> Self
[src]
Create a new SwitchTo struct. This is typically created internally
via a call to WebDriver::switch_to()
.
pub async 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 async fn default_content<'_>(&'_ self) -> WebDriverResult<()>
[src]
Switch focus to the default frame.
pub async fn frame_number<'_>(
&'_ self,
frame_number: u16
) -> WebDriverResult<()>
[src]
&'_ self,
frame_number: u16
) -> WebDriverResult<()>
Switch focus to the frame by index.
pub async fn frame_name<'_, '_>(
&'_ self,
frame_name: &'_ str
) -> WebDriverResult<()>
[src]
&'_ self,
frame_name: &'_ str
) -> WebDriverResult<()>
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 async fn frame_element<'_>(
&'_ self,
frame_element: WebElement
) -> WebDriverResult<()>
[src]
&'_ self,
frame_element: WebElement
) -> WebDriverResult<()>
Switch focus to the specified element.
pub async fn parent_frame<'_>(&'_ self) -> WebDriverResult<()>
[src]
Switch focus to the parent frame.
pub async fn window<'_, '_>(
&'_ self,
handle: &'_ WindowHandle
) -> WebDriverResult<()>
[src]
&'_ self,
handle: &'_ WindowHandle
) -> WebDriverResult<()>
Switch focus to the specified window.
pub async 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,