pub struct Session {
pub id: SessionId,
pub command: String,
pub created_at: DateTime<Utc>,
/* private fields */
}Fields§
§id: SessionId§command: String§created_at: DateTime<Utc>Implementations§
Source§impl Session
impl Session
pub fn pid(&self) -> Option<u32>
pub fn is_running(&mut self) -> bool
pub fn size(&self) -> (u16, u16)
pub fn update(&mut self) -> Result<(), SessionError>
pub fn screen_text(&self) -> String
pub fn cursor(&self) -> CursorPosition
pub fn detect_elements(&mut self) -> &[Element]
pub fn cached_elements(&self) -> &[Element]
pub fn find_element(&self, element_ref: &str) -> Option<&Element>
pub fn keystroke(&self, key: &str) -> Result<(), SessionError>
pub fn keydown(&mut self, key: &str) -> Result<(), SessionError>
pub fn keyup(&mut self, key: &str) -> Result<(), SessionError>
pub fn type_text(&self, text: &str) -> Result<(), SessionError>
pub fn click(&mut self, element_ref: &str) -> Result<(), SessionError>
pub fn fill( &mut self, element_ref: &str, value: &str, ) -> Result<(), SessionError>
pub fn resize(&mut self, cols: u16, rows: u16) -> Result<(), SessionError>
pub fn kill(&mut self) -> Result<(), SessionError>
pub fn pty_write(&self, data: &[u8]) -> Result<(), SessionError>
pub fn pty_try_read( &self, buf: &mut [u8], timeout_ms: i32, ) -> Result<usize, SessionError>
pub fn start_recording(&mut self)
pub fn stop_recording(&mut self) -> Vec<RecordingFrame>
pub fn recording_status(&self) -> RecordingStatus
pub fn start_trace(&mut self)
pub fn stop_trace(&mut self)
pub fn is_tracing(&self) -> bool
pub fn get_trace_entries(&self, count: usize) -> Vec<TraceEntry>
pub fn get_errors(&self, count: usize) -> Vec<ErrorEntry>
pub fn error_count(&self) -> usize
pub fn clear_errors(&mut self)
pub fn clear_console(&mut self)
Auto Trait Implementations§
impl Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl !Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.