[−][src]Struct thirtyfour::ScriptRet
Helper struct for getting return values from scripts. See the examples for WebDriver::execute_script() and WebDriver::execute_async_script().
Methods
impl ScriptRet
[src]
pub fn new(
conn: Arc<RemoteConnectionAsync>,
session_id: SessionId,
value: Value
) -> Self
[src]
conn: Arc<RemoteConnectionAsync>,
session_id: SessionId,
value: Value
) -> Self
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 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 !RefUnwindSafe for ScriptRet
impl Send for ScriptRet
impl Sync for ScriptRet
impl Unpin for ScriptRet
impl !UnwindSafe for ScriptRet
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>,