pub trait HasDeviceTime: AppiumClientTrait {
    // Provided methods
    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_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 { ... }
}
Expand description

Get device time

Provided Methods§

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.

See https://momentjs.com/docs/ to get the full list of supported datetime format specifiers. The default format is YYYY-MM-DDTHH:mm:ssZ, which complies to ISO-8601.

Implementors§