pub struct Element { /* private fields */ }
Expand description
A wrapper helps access real DOM element for testing
Implementations
sourceimpl Element
impl Element
sourcepub fn as_event_target(&self) -> &EventTarget
pub fn as_event_target(&self) -> &EventTarget
As a reference to web_sys::EventTarget
sourcepub fn as_element(&self) -> &Element
pub fn as_element(&self) -> &Element
Reference to the element
sourcepub fn as_input(&self) -> &HtmlInputElement
pub fn as_input(&self) -> &HtmlInputElement
As a reference to web_sys::HtmlInputElement
sourcepub fn as_select(&self) -> &HtmlSelectElement
pub fn as_select(&self) -> &HtmlSelectElement
As a reference to web_sys::HtmlSelectElement
sourcepub fn as_option(&self) -> &HtmlOptionElement
pub fn as_option(&self) -> &HtmlOptionElement
As a reference to web_sys::HtmlOptionElement
sourcepub fn as_textarea(&self) -> &HtmlTextAreaElement
pub fn as_textarea(&self) -> &HtmlTextAreaElement
As a reference to web_sys::HtmlTextAreaElement
sourcepub fn input_input(&self, value: &str)
pub fn input_input(&self, value: &str)
Set input element value then trigger an input event
sourcepub fn change_input(&self, value: &str)
pub fn change_input(&self, value: &str)
Set input element value then trigger a change event
sourcepub fn change_select(&self, value: &str)
pub fn change_select(&self, value: &str)
Set select element value then trigger a change event
sourcepub fn change_index(&self, index: usize)
pub fn change_index(&self, index: usize)
Set select element index then trigger a change event
sourcepub fn change_textarea(&self, value: &str)
pub fn change_textarea(&self, value: &str)
Set textarea element value then trigger a change event
Auto Trait Implementations
impl RefUnwindSafe for Element
impl !Send for Element
impl !Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more