Type Alias appium_client::IOSClient
source · pub type IOSClient = Client<IOSCapabilities>;
Expand description
Client used to automate iOS testing
To create IOSClient, you need to use ClientBuilder and IOSCapabilities. Rust type system will automatically pick up that by using those capabilities, you mean to control an iOS device.
See trait implementations to check available features (commands) of this client.
use appium_client::capabilities::{AppCapable, UdidCapable};
use appium_client::capabilities::ios::IOSCapabilities;
use appium_client::ClientBuilder;
let mut capabilities = IOSCapabilities::new_xcui();
capabilities.udid("000011114567899");
capabilities.app("/apps/sample.ipa");
let client = ClientBuilder::native(capabilities)
.connect("http://localhost:4723/wd/hub/")
.await?;
// congratulations, you have successfully created an IOSClient
Aliased Type§
struct IOSClient { /* private fields */ }
Trait Implementations§
source§impl CanRecordScreen for IOSClient
impl CanRecordScreen for IOSClient
fn start_recording_screen<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn start_recording_with_options<'life0, 'async_trait>( &'life0 self, force_restart: Option<bool>, time_limit: Option<Duration>, options: HashMap<String, Value> ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn stop_recording_screen<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn stop_recording_with_options<'life0, 'async_trait>( &'life0 self, options: HashMap<String, Value> ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl HasAppStrings for IOSClient
impl HasAppStrings for IOSClient
fn app_strings_default_lang<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn app_strings<'life0, 'life1, 'async_trait>( &'life0 self, lang: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn app_strings_from_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, lang: &'life1 str, file: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
source§impl HasBattery<IOSCapabilities> for IOSClient
impl HasBattery<IOSCapabilities> for IOSClient
fn battery_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BatteryInfo<Caps>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl HasClipboard for IOSClient
impl HasClipboard for IOSClient
fn get_clipboard<'life0, 'async_trait>( &'life0 self, content_type: ClipboardContentType ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn set_clipboard<'life0, 'async_trait, CT>( &'life0 self, content_type: ClipboardContentType, content: CT ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where CT: AsRef<[u8]> + Send + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait,
fn set_clipboard_text<'life0, 'async_trait, CT>( &'life0 self, content: CT ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where CT: AsRef<[u8]> + Send + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait,
fn get_clipboard_text<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl HasDeviceTime for IOSClient
impl HasDeviceTime for IOSClient
source§fn device_time<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn device_time<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Gets device date and time for both iOS (host time is returned for simulators) and Android devices.
The default format since Appium 1.8.2 is
YYYY-MM-DDTHH:mm:ssZ
, which complies to ISO-8601.source§fn device_time_with_format<'life0, 'life1, 'async_trait>(
&'life0 self,
format: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn device_time_with_format<'life0, 'life1, 'async_trait>( &'life0 self, format: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Gets device date and time for both iOS and Android devices with given format. Read more
source§impl HasOnScreenKeyboard for IOSClient
impl HasOnScreenKeyboard for IOSClient
source§impl HasSettings for IOSClient
impl HasSettings for IOSClient
fn set_settings<'life0, 'async_trait>( &'life0 self, values: Map<String, Value> ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn set_setting<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, value: Value ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn get_settings<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl HidesKeyboard for IOSClient
impl HidesKeyboard for IOSClient
source§fn hide_keyboard<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn hide_keyboard<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Tries to hide keyboard using default system mechanism. Read more
fn hide_keyboard_with_key<'life0, 'life1, 'async_trait>( &'life0 self, key_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn hide_keyboard_with_strategy<'life0, 'life1, 'async_trait>( &'life0 self, strategy: HideKeyboardStrategy, key_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl IOSCanRecordScreen for IOSClient
impl IOSCanRecordScreen for IOSClient
source§fn start_recording<'life0, 'async_trait>(
&'life0 self,
video_codec: Option<String>,
video_quality: Option<IOSVideoQuality>,
fps: Option<u8>,
video_scale: Option<String>,
video_filters: Option<String>,
force_restart: Option<bool>,
time_limit: Option<Duration>,
options: ScreenRecordingUploadOptions
) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn start_recording<'life0, 'async_trait>( &'life0 self, video_codec: Option<String>, video_quality: Option<IOSVideoQuality>, fps: Option<u8>, video_scale: Option<String>, video_filters: Option<String>, force_restart: Option<bool>, time_limit: Option<Duration>, options: ScreenRecordingUploadOptions ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Starts screen recording (Android). Read more
fn stop_recording<'life0, 'async_trait>( &'life0 self, options: ScreenRecordingUploadOptions ) -> Pin<Box<dyn Future<Output = Result<String, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl InteractsWithApps for IOSClient
impl InteractsWithApps for IOSClient
fn install_app<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn is_app_installed<'life0, 'life1, 'async_trait>( &'life0 self, bundle_id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<bool, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn run_app_in_background<'life0, 'async_trait>( &'life0 self, duration: Duration ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn remove_app<'life0, 'life1, 'async_trait>( &'life0 self, bundle_id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn activate_app<'life0, 'life1, 'async_trait>( &'life0 self, bundle_id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn app_state<'life0, 'life1, 'async_trait>( &'life0 self, bundle_id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<AppState, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn terminate_app<'life0, 'life1, 'async_trait>( &'life0 self, bundle_id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl LocksDevice for IOSClient
impl LocksDevice for IOSClient
source§impl PerformsTouchID for IOSClient
impl PerformsTouchID for IOSClient
source§fn perform_touch_id<'life0, 'async_trait>(
&'life0 self,
successful_scan: bool
) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn perform_touch_id<'life0, 'async_trait>( &'life0 self, successful_scan: bool ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Simulate touchId event.
source§fn toggle_touch_id_enrollment<'life0, 'async_trait>(
&'life0 self,
enabled: bool
) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn toggle_touch_id_enrollment<'life0, 'async_trait>( &'life0 self, enabled: bool ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Enrolls touchId in iOS Simulators. This call will only work if Appium process
or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility
in System Preferences > Security & Privacy > Privacy > Accessibility list.
source§impl PullsFiles for IOSClient
impl PullsFiles for IOSClient
source§fn pull_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pull_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Pulls a single file from device
source§fn pull_folder<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pull_folder<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Pulls folder and returns zip file containing the content
source§impl PushesFiles for IOSClient
impl PushesFiles for IOSClient
source§impl ShakesDevice for IOSClient
impl ShakesDevice for IOSClient
source§impl SupportsContextSwitching for IOSClient
impl SupportsContextSwitching for IOSClient
fn set_context<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn current_context<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Option<String>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
fn available_contexts<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§impl SupportsLocation for IOSClient
impl SupportsLocation for IOSClient
fn location<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
source§fn set_location<'life0, 'async_trait>(
&'life0 self,
location: Location
) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn set_location<'life0, 'async_trait>( &'life0 self, location: Location ) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Tries to set location if the driver/device supports it. Returns location of device after the attempt. Read more