podium-driver 0.2.0

Async Rust library for driving Android devices in tests via Maestro's gRPC server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::error::TransportError;
use crate::types::{Direction, Selector};
use async_trait::async_trait;

#[async_trait]
pub(crate) trait Transport: Send + Sync {
    async fn launch_app(&self, app_id: &str, clear_state: bool) -> Result<(), TransportError>;
    async fn is_visible(&self, selector: &Selector) -> Result<bool, TransportError>;
    async fn tap(&self, selector: &Selector) -> Result<(), TransportError>;
    async fn input_text(&self, text: &str) -> Result<(), TransportError>;
    async fn hide_keyboard(&self) -> Result<(), TransportError>;
    async fn swipe(&self, direction: &Direction) -> Result<(), TransportError>;
    async fn back(&self) -> Result<(), TransportError>;
    async fn wait_for_idle(&self, timeout_ms: u64) -> Result<(), TransportError>;
    async fn take_screenshot(&self, name: &str) -> Result<(), TransportError>;
}