pub struct AndroidDriver { /* private fields */ }Expand description
Android device driver using ADB + DroidRun Portal.
Implementations§
Source§impl AndroidDriver
impl AndroidDriver
Sourcepub fn adb_device(&self) -> Result<&AdbDevice>
pub fn adb_device(&self) -> Result<&AdbDevice>
Get a reference to the underlying ADB device.
Sourcepub fn portal_client(&self) -> Result<&PortalClient>
pub fn portal_client(&self) -> Result<&PortalClient>
Get a reference to the Portal client.
Trait Implementations§
Source§impl DeviceDriver for AndroidDriver
impl DeviceDriver for AndroidDriver
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Establish connection to the device.
Source§fn ensure_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect if not already connected.
Source§fn tap<'life0, 'async_trait>(
&'life0 self,
x: i32,
y: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tap<'life0, 'async_trait>(
&'life0 self,
x: i32,
y: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Tap at absolute pixel coordinates.
Source§fn swipe<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn swipe<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Swipe from (x1, y1) to (x2, y2) over duration_ms.
Source§fn input_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
clear: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn input_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
clear: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Type text into the currently focused field.
Source§fn press_key<'life0, 'async_trait>(
&'life0 self,
keycode: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn press_key<'life0, 'async_trait>(
&'life0 self,
keycode: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a single key event.
Source§fn drag<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drag<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Drag from (x1, y1) to (x2, y2).
Source§fn start_app<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
package: &'life1 str,
activity: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn start_app<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
package: &'life1 str,
activity: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Launch an application.
Source§fn install_app<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_app<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Install an APK.
Source§fn get_apps<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_apps<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List installed apps with labels.
Source§fn list_packages<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_packages<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List installed package names.
Source§fn screenshot<'life0, 'async_trait>(
&'life0 self,
hide_overlay: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn screenshot<'life0, 'async_trait>(
&'life0 self,
hide_overlay: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take a screenshot (PNG bytes).
Source§fn get_ui_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ui_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the accessibility tree + phone state as JSON.
Source§fn get_date<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_date<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the device date/time.
Source§fn supported_actions(&self) -> &HashSet<Action>
fn supported_actions(&self) -> &HashSet<Action>
Which actions this driver supports.
Auto Trait Implementations§
impl Freeze for AndroidDriver
impl !RefUnwindSafe for AndroidDriver
impl Send for AndroidDriver
impl Sync for AndroidDriver
impl Unpin for AndroidDriver
impl UnsafeUnpin for AndroidDriver
impl !UnwindSafe for AndroidDriver
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