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

source§

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,

source§

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,

source§

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,

source§

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

source§

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,

source§

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,

source§

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

source§

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

source§

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,

source§

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,

source§

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,

source§

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

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,

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,

Gets device date and time for both iOS and Android devices with given format. Read more
source§

impl HasOnScreenKeyboard for IOSClient

source§

fn keyboard_shown<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<bool, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source§

impl HasSettings for IOSClient

source§

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,

source§

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,

source§

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

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,

Tries to hide keyboard using default system mechanism. Read more
source§

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,

source§

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

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,

Starts screen recording (Android). Read more
source§

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

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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

source§

fn lock_device<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Locks the device. Note: iOS can only be unlocked manually.
source§

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,

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,

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

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,

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,

Pulls folder and returns zip file containing the content
source§

impl PushesFiles for IOSClient

source§

fn push_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 str, data: &'life2 [u8] ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

impl ShakesDevice for IOSClient

source§

fn shake<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Simulate shaking the device.
source§

impl SupportsContextSwitching for IOSClient

source§

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,

source§

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,

source§

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

source§

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,

Tries to set location if the driver/device supports it. Returns location of device after the attempt. Read more
source§

impl SupportsRotation for IOSClient

source§

fn orientation<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Orientation, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source§

fn set_orientation<'life0, 'async_trait>( &'life0 self, orientation: Orientation ) -> Pin<Box<dyn Future<Output = Result<Orientation, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source§

fn rotation<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<DeviceRotation, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source§

fn set_rotation<'life0, 'async_trait>( &'life0 self, rotation: DeviceRotation ) -> Pin<Box<dyn Future<Output = Result<DeviceRotation, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,