[−][src]Struct thirtyfour::prelude::ScriptRet
Helper struct for getting return values from scripts. See the examples for WebDriver::execute_script() and WebDriver::execute_async_script().
Implementations
impl<'a> ScriptRet<'a>
[src]
pub fn new(driver: WebDriverSession<'a>, value: Value) -> Self
[src]
Create a new ScriptRet. This is typically done automatically via WebDriver::execute_script() or WebDriver::execute_async_script()
pub fn value(&self) -> &Value
[src]
Get the raw JSON value.
pub fn convert<T>(&self) -> WebDriverResult<T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
pub fn get_element(&self) -> WebDriverResult<WebElement>
[src]
Get a single WebElement return value. Your script must return only a single element for this to work.
pub fn get_elements(&self) -> WebDriverResult<Vec<WebElement>>
[src]
Get a vec of WebElements from the return value. Your script must return an array of elements for this to work.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ScriptRet<'a>
impl<'a> Send for ScriptRet<'a>
impl<'a> Sync for ScriptRet<'a>
impl<'a> Unpin for ScriptRet<'a>
impl<'a> !UnwindSafe for ScriptRet<'a>
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>,